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 | Fractured Fractals

The author of the idea: Scriptor, the author of the MQL5 code: barabashkakvn.

The Expert Advisor uses the iFractals indicator signals to place pending Buy Stop and Sell Stop orders and trail the Stop Loss levels of positions. A condition to place a Buy Stop order occurs when there are two upper fractals, of which the last formed one ("Up youngest") is higher than the previous fractal ("Up middle").

Stop Loss of a Buy Stop order is set at the latest lower fractal ("Down youngest"). Then, Stop Loss of a Buy position is trailed based on that "Down youngest" fractal.

MetaTrader Experts, Indicators, Scripts and Libraries

Fig. 1. Conditions for Buy Stop

Conditions are opposite for Sell orders and Sell positions.

Input Parameters

  • Maximum Risk in percentage - maximum allowable risk;
  • Decrease factor - lot reduction factor in case of losing trades;
  • Life time of the pending order (in hours) - pending order life time in hours;
  • magic number - unique identifier for the EA.

Testing results on M30 and H2:

MetaTrader Experts, Indicators, Scripts and Libraries

MetaTrader Experts, Indicators, Scripts and Libraries

20127

Best MetaTrader Indicators + Profitable Expert Advisors