Hi guys,
I am drafting my own EA and is unsure how to code a specific condition.
I am using Bollinger Bands for buy and sell signals. A buy signal is triggered when the closing price of the current candle is above the upper band and vice versa for a sell signal. I have managed to code this correctly.
The condition that I please need coding assistance with is for open and pending trades to be closed when the Closing prices of two subsequent candles are below the upper band (with opened buy trades) or above the lower band (with opened sell trades).
Please can anyone assist. Will be much appreciated.
I am drafting my own EA and is unsure how to code a specific condition.
I am using Bollinger Bands for buy and sell signals. A buy signal is triggered when the closing price of the current candle is above the upper band and vice versa for a sell signal. I have managed to code this correctly.
The condition that I please need coding assistance with is for open and pending trades to be closed when the Closing prices of two subsequent candles are below the upper band (with opened buy trades) or above the lower band (with opened sell trades).
Please can anyone assist. Will be much appreciated.