Trying to make EA detect if range between 8am and 9am in the morning is above the open and close range of the previous day but not working
-
Hi
I'm trying to do an EA which defines the range between 8am and 9am at market open for an index, then checks whether the range is above the open and close range from the previous day.
If it is and then there is a bull candle which is more than 10 pips which finishes above the range between 8am and 9am I am then trying to open a buy trade.
I'm not sure that the conditions I have placed will do the job in detecting the ranges as I've said that the low and high of the range in that timeframe need to be above high of the range from the previous day.
I'm also having difficulty making sure that the candle close is used on the bull candle which is more than 10 ticks.
If someone could cast there eye over it that would be great.
Here is the project -
Not completely sure I get the idea. If I understand it correctly, you mean something like this:
Example 1.
- Range today from 08:00 to 09:00: 28 pips.
- Daily range yesterday: 100 pips.
No trades are open today.
Example 2.
- Range today from 08:00 to 09:00: 50 pips.
- Daily range yesterday: 40 pips.
Trades will be open today if all other conditions are met.
Is this correct?
-
Not quite, I'll use the FTSE 100 as an example. If the daily range of the day before was between 6950 and 7000, then the EA would check whether the range between 8am to 9am the following day range was above this price level, so if the range was 7010 and 7030 between 8am and 9am, the EA would then look for a large bull candle above 10 pips breaking out of the 8am and 9am range and place a buy trade at the bull candles close price.