|
@@ -134,8 +134,19 @@ void Bos(int i)
|
|
|
if(close > high)
|
|
if(close > high)
|
|
|
{
|
|
{
|
|
|
high_index = iBarShift(Symbol(), PERIOD_CURRENT, high_index_time, false);
|
|
high_index = iBarShift(Symbol(), PERIOD_CURRENT, high_index_time, false);
|
|
|
- Store_bos_last_index = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
|
|
|
|
|
- for(int j = i ; j < Store_bos_last_index ; j++)
|
|
|
|
|
|
|
+
|
|
|
|
|
+ int lastindex = 0;
|
|
|
|
|
+
|
|
|
|
|
+ if(store_last_bos_index_time > choch_index_time)
|
|
|
|
|
+ {
|
|
|
|
|
+ lastindex = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ lastindex = iBarShift(Symbol(), PERIOD_CURRENT, choch_index_time, false);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ for(int j = i ; j < lastindex ; j++)
|
|
|
{
|
|
{
|
|
|
if(checkCandle(j) == "Bearish")
|
|
if(checkCandle(j) == "Bearish")
|
|
|
{
|
|
{
|
|
@@ -226,8 +237,19 @@ void Bos(int i)
|
|
|
if(close1 < low)
|
|
if(close1 < low)
|
|
|
{
|
|
{
|
|
|
low_index = iBarShift(Symbol(), PERIOD_CURRENT, low_index_time, false);
|
|
low_index = iBarShift(Symbol(), PERIOD_CURRENT, low_index_time, false);
|
|
|
- Store_bos_last_index = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
|
|
|
|
|
- for(int j= i ; j < Store_bos_last_index ; j++)
|
|
|
|
|
|
|
+
|
|
|
|
|
+ int lastindex = 0;
|
|
|
|
|
+
|
|
|
|
|
+ if(store_last_bos_index_time > choch_index_time)
|
|
|
|
|
+ {
|
|
|
|
|
+ lastindex = iBarShift(Symbol(), PERIOD_CURRENT, store_last_bos_index_time, false);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ lastindex = iBarShift(Symbol(), PERIOD_CURRENT, choch_index_time, false);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ for(int j= i ; j < lastindex ; j++)
|
|
|
{
|
|
{
|
|
|
if(checkCandle(j) == "Bullish")
|
|
if(checkCandle(j) == "Bullish")
|
|
|
{
|
|
{
|