Hello, I have an EA im planning to make.
1st question is : how can i make EA to look back past x number of candles for the conditions to be met?
I need the EA to observe the past 100 candles to see if all conditions are met.
An example of such scenario that requires the above function is:
To execute sell trade, 4 steps need to be met.
RSI crosses above 75 - step 1
RSI falls below 60 but not less than 40 - step 2
RSI crosses above 75 again -step 3
Finally, RSI falls below 60 -step 4
When step 4 is completed, the EA will execute the Sell trade.
But I want there to be a time limit whereby if all 4 steps are not done within past 100 candles, it will not execute.
2nd question is,
I want there to be at least 4 candles above RSI 75 for step 1 and step 3.
How can I set such setting?
Thank you all and much love