Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Expert Advisor | Ingrit

Idea by: Ingrit

mq5 code by: barabashkakvn

BUY opening condition.

Bar #1 is bearish

Difference between the High price of bar #14 and the Low price of bar #1 exceeds the value of parameter "Step"

   if(rates_m5[1].open>rates_m5[1].close)        if((rates_m5[14].high-rates_m5[1].low)>ExtStep)          {           if(!InpReverse)              m_need_open_buy=true;           else              m_need_open_sell=true;          }    

SELL opening condition.

Bar #1 is bullish

Difference between the High price of bar #14 and the Low price of bar #1 exceeds the value of parameter "Step"

   if(rates_m5[1].close>rates_m5[1].open)        if((rates_m5[1].high-rates_m5[14].low)>ExtStep)          {           if(!InpReverse)              m_need_open_sell=true;           else              m_need_open_buy=true;          }  

Testing at EURUSD, H1:

MetaTrader Experts, Indicators, Scripts and Libraries

23499