• 概述
  • 评论 (2)
  • 评论 (9)
  • 新特性

TrailingByParabolicSAR

The Expert Advisor trails open positions based on the value of Parabolic SAR 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 SAR value and at the preset distance from it.


Parameters

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 Parabolic SAR 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.

Parameters of Parabolic SAR:

  • SAR's Step - the step of Parabolic SAR.
  • SAR's Maximum - Maximum Parabolic SAR.
  • Used bar SAR - the bar of Parabolic SAR, which data are used for position stop calculation.
  • Used timeframe SAR - timeframe used for Parabolic SAR calculation. May differ from the timeframe of the chart the EA is running on.
  • Distance from the stop level of SAR 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.
Oksana Machok
738
2017.02.08 14:24 
 

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

Ovidiu Caslariu
7845
2016.05.07 22:43 
 

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

版本 1.1 - 2015.12.24
Redesigned for the new mql4.