• 概述
  • 评论 (5)
  • 评论 (5)
  • 新特性

TrailingByMovingAverages

The Expert Advisor trails open positions based on the value of the Moving Averages on the same symbol. Once the position profit exceeds a value specified in the settings (it can be negative), trailing stop is switched on. Position stop is trailed at the amount equal to the MA value and at the preset distance from it.


Inputs

Position parameters:

  • MagicNumber (-1 == all positions) - the magic number of the orders to trail. For example, 100500 - it will trail the stops of the EA that opens positions with the magic number 100500. If you enter -1, all available market positions will be trailed.

Trailing parameters:

  • Pips profit to run trailing - the trailing trigger level. Once the position profit in points exceeds the value, the EA will start to trail the position stop based on the MA value. The value can be negative. In this case, the stop can be set in the region of negative gains.
  • Trailing only profit area - trail stops only when a position shows profit. In this case the stop level will be trailed only when a position is in the profitable area.
  • Steps trailing in points. To avoid trade server overloading by sending constant requests to modify stop loss at each tick, this limitation is used. If the stop has been trailed, now the next modification will be made only after the next stop level will differ from the current one by a predetermined number of points. If set to 3 points, and stop is at 100 points, the next stop modification will only happen when the stop level is more than 103 pips.

Moving Average Parameters:

  • Period MovAvg for trail - MA period.
  • Price used to calculate the MovAvg.
  • Method of smoothing MovAvg.
  • Shift the MovAvg - MA shift relative to the price chart.
  • Used bar MovAvg - MA bar, which data are used for position stop calculation.
  • Used timeframe MovAvg - timeframe used for MA calculation. May differ from the timeframe of the chart the EA is running on.
  • Distance from the stop level of MA in points.

Additional parameters:

  • Draws graphics Yes/No - show/hide graphic representation of the trailing start levels and position stop levels.
  • Color level for Buy
  • Color level for Sell
  • Show objects descriptions Yes/No - show/hide information about the ticket of the trail start level (the ticket of the position to which the level belongs is show on the left of the level). This parameter should be used only when graphics is allowed (Yes in the Draws graphics parameter).
  • Descriptions text size.

Trade order parameters:

  • Number of attempts to trade on failure - the number of attempts to trade in case of trade request execution error. If the server returns some modification error, the EA processes the code returned by the server and sends a second request adjusted under the new conditions. The number of attempts is set in this parameter.
  • Slippage - price slippage. This is the difference of the price sent in a trade request and the price of the execution returned by the trade server. If they differ by no more than the specified number of points, the level will be modified. If the difference is greater, the EA will try to do a second trade request (as many times as specified in the parameter Number of attempts to trade on failure)
  • Use sound Yes/No - a sound alert on execution of trade operations.
Eleni Anna Branou
3613
2017.02.20 16:13 
 

Helpful.

Enrico Lombardi
171
2016.05.20 14:43 
 

Very Nice EA!

Ovidiu Caslariu
7846
2016.03.02 21:45 
 

Doesn't seem to trade...

Paulo Ricardo Gois Ubillus
636
2015.10.08 09:56   

não estou conseguindo simular os testes dos anos anteriores com seu EA, qual o motivo?

Dina Paches
7640
2014.08.12 17:17 
 

用户没有留下任何评级信息

版本 1.1 - 2015.12.24
Redesigned for the new mql4.