|
|
@@ -134,8 +134,19 @@ void Bos(int i)
|
|
134
|
134
|
if(close > high)
|
|
135
|
135
|
{
|
|
136
|
136
|
high_index = iBarShift(Symbol(), PERIOD_CURRENT, high_index_time, false);
|
|
137
|
|
- Store_bos_last_index = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
|
|
138
|
|
- for(int j = i ; j < Store_bos_last_index ; j++)
|
|
|
137
|
+
|
|
|
138
|
+ int lastindex = 0;
|
|
|
139
|
+
|
|
|
140
|
+ if(store_last_bos_index_time > choch_index_time)
|
|
|
141
|
+ {
|
|
|
142
|
+ lastindex = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
|
|
|
143
|
+ }
|
|
|
144
|
+ else
|
|
|
145
|
+ {
|
|
|
146
|
+ lastindex = iBarShift(Symbol(), PERIOD_CURRENT, choch_index_time, false);
|
|
|
147
|
+ }
|
|
|
148
|
+
|
|
|
149
|
+ for(int j = i ; j < lastindex ; j++)
|
|
139
|
150
|
{
|
|
140
|
151
|
if(checkCandle(j) == "Bearish")
|
|
141
|
152
|
{
|
|
|
@@ -226,8 +237,19 @@ void Bos(int i)
|
|
226
|
237
|
if(close1 < low)
|
|
227
|
238
|
{
|
|
228
|
239
|
low_index = iBarShift(Symbol(), PERIOD_CURRENT, low_index_time, false);
|
|
229
|
|
- Store_bos_last_index = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
|
|
230
|
|
- for(int j= i ; j < Store_bos_last_index ; j++)
|
|
|
240
|
+
|
|
|
241
|
+ int lastindex = 0;
|
|
|
242
|
+
|
|
|
243
|
+ if(store_last_bos_index_time > choch_index_time)
|
|
|
244
|
+ {
|
|
|
245
|
+ lastindex = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
|
|
|
246
|
+ }
|
|
|
247
|
+ else
|
|
|
248
|
+ {
|
|
|
249
|
+ lastindex = iBarShift(Symbol(), PERIOD_CURRENT, choch_index_time, false);
|
|
|
250
|
+ }
|
|
|
251
|
+
|
|
|
252
|
+ for(int j= i ; j < lastindex ; j++)
|
|
231
|
253
|
{
|
|
232
|
254
|
if(checkCandle(j) == "Bullish")
|
|
233
|
255
|
{
|