Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2012.11.19 16:00

TrendCapture - expert for MetaTrader 5

| English Русский 中文 Español Deutsch 日本語 Português

votes: 14

This Expert Advisor is rewritten from MQL4 and was originally published here 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.



  • 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.

Translated from Russian by MetaQuotes Software Corp.
Original code:

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

Average Directional Movement Index (ADX) Average Directional Movement Index (ADX)

The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.

TP-SL_Removing TP-SL_Removing

Immediately deletes the SL/TP of all positions.

Closed_TOTAL Closed_TOTAL

Total closure of all positions (winners/losers). You can also select which are of a single instrument.