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 | TrendCapture

This Expert Advisor is rewritten from MQL4 and was originally published here https://www.mql5.com/en/code/8146 by its author Reshetov.  

How It Works

The direction for an entry is determined by the SAR indicator, provided that ADX is lower than the level specified. If the last trade was winning, a position can be opened in the direction of the last winning trade. If the last trade was losing, a position can be opened only in the direction opposite to that of the last trade.

The image shows the performance of the Expert Advisor in the strategy tester's visual mode.

MetaTrader Experts, Indicators, Scripts and Libraries

Parameters

  • Lots - Lot.
  • MaximumRisk - Risk (it is used if Lots=0).
  • StopLoss - Stop Loss in points.
  • TakeProfit - Take Profit in points.
  • SARStep - SAR step.
  • SARMax - maximum SAR step.
  • ADXPeriod - ADX period.
  • ADXLevel - ADX level.
  • Shift - The bar on which the indicator values are checked.
  • BreakEven - Profit level of a position expressed in points in order to move the Stop Loss to the breakeven level. If the value is 0, the function is disabled.
     
1075

Best MetaTrader Indicators + Profitable Expert Advisors