Currencyprofits_01.1 – EA MetaTrader 5

Author of the idea — John Smith, author of the MQL5 code — barabashkakvn.

Condition to open Buy: if the value of the first MA is greater than the second MA on the first bar, and the current price has broken the Low of the last six bars:

      //--- Buy
      if(iMAGet(handle_iMA_first,1)>iMAGet(handle_iMA_second,1) &&  
         m_symbol.Bid()<=iLowest(m_symbol.Name(),Period(),MODE_LOW,6,1))

Condition to open Buy: if the value of the first MA is lower than the second MA on the first bar, and the current price has broken the High of the last six bars:

      //--- Sell
      if(iMAGet(handle_iMA_first,1)<iMAGet(handle_iMA_second,1) &&  
         m_symbol.Bid()>=iHighest(m_symbol.Name(),Period(),MODE_HIGH,6,1))

Currencyprofits_01.1 tester

 

Alternative:  Forex_Market_Hours_GMT_v4.0 - indicator MetaTrader 5


📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks