if(Close[3] < Open[3] && Close[2] > Open[2] && Close[1] < Open[1]){
//OrderSend() sell code here
}
.
Don't check the current candle and fire on next, just always check past candles since they don't change. This will always fire on an open of a new candle since all past candles get pushed back.
.
Jon

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
Example, i would like to write an ea check the current candle, the previous candle, and the previous of the previous candles
condition:
if
the previous of the previous candles = bearish candle ( close < open)
the previous candle = bullish candle ( open < close)
and current candle = bearish candle
then
Fire Sell next open candle
and vice verse..
Can any one give me some tips or a sample code, would be really appreciated.
Thanks