Hello, I would be extremely grateful if somebody could please provide me with help for a line of code. My code thus far is built for a 2 hourly chart and enters a buy when a new candle opens and the current price is above the Parabolic sar indicator, above the 20 day moving average & above the 50 day moving average. I want to add an additional line of code so the ‘buy’ only executes when all the above conditions are met & if the current price is higher 2 minutes after the new candle opens than the closing price of the last candle. Can anybody help please?
All conditions can be coded except the last one about the “current price is higher 2 minutes after the new candle opens than the closing price of the last candle” , which is impossible because code are only executed once at the bar close.
How do you want to adapt your strategy?
Thanks for your help Nicolas it’s greatly appreciated.