Three Typical Candles – EA MetaTrader 5
The EA only operates when a new bar appears within a specified time interval. It calculates the Typical prices for bars #1, #2, and #3. This results in getting trading signals: double typical_3=(rates[3].high+rates[3].low+rates[3].close)/3.0; double typical_2=(rates[2].high+rates[2].low+rates[2].close)/3.0; double typical_1=(rates[1].high+rates[1].low+rates[1].close)/3.0; if(typical_3<typical_2 && typical_2<typical_1) if(count_buys==0) m_need_open_buy=true; if(typical_3>typical_2 && typical_2>typical_1) if(count_sells==0) m_need_open_sell=true; No