iHigh and iLow not working consistently
This part :
extern int lookback_hour = 1; .... high = iHigh(Symbol(),PERIOD_H1,lookback_hour); low = iLow(Symbol(),PERIOD_H1,lookback_hour);is not supposed to get high and low of 11th hour, but of the 1st closed bar in 1 hour time frame. That entirely depends on the time of the day and the 1 hour data
This part :
is not supposed to get high and low of 11th hour, but of the 1st closed bar in 1 hour time frame. That entirely depends on the time of the day and the 1 hour dataif((timedayofweek == setdayofweek) && (timehour == adjusted_hour) && (enable_stops == 1))
This line in the program activates the program when I want it to check the previous candle. For example, if I want to activate the program to set the buy and sell stops on Tuesday at 12 london time, using the high and low of the 11th hour candle, I use the following inputs:
extern int setdayofweek = 2;
extern int sethour = 12; extern int lookback_hour = 1;
This line in the program activates the program when I want it to check the previous candle. For example, if I want to activate the program to set the buy and sell stops on Tuesday at 12 london time, using the high and low of the 11th hour candle, I use the following inputs:
extern int setdayofweek = 2;
This program works erratically in setting up the HIGHS and LOWS of the 11th hour candles. Suppose go active on the 12th candles using the high and low of the 11th candle. But sometimes it sets up a different candle. Today it went active on the 13th candle and set up the high and low of the 12th candle. The default values were not changed. Could someone please tell me why this is happening?