Bullish , Bearish Candles EA ?

 

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

 

Much candle code is here 'SVOS Multi-Indicator EA'

Good Luck

-BB-

 

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