Skip to content

Trailing

Arsen Abazian edited this page Jun 21, 2019 · 2 revisions

Trailing mechanism is controlled by two parameters:

  • AllowTrailing - allows the strategy to use trailing for the opened position. If trailing enabled, then the strategy will follow the price after open position and will update the close price according to the highest price after position open, and the value specified in TrailingStopLossPc. For example, TrailingStopLossPc = 2%, the highest price is 8500, then the close price = highest_price - highest_price * TrailingStopLossPc / 100 = 8500 - 8500 * 2 / 100 = 8330. When trendline after going up (common situation when trendline breaks resistance) changes its direction and goes below 8330, the position will close.
  • TrailingStopLossPc - specifies the value in percent from the highest price after open position. The picture below shows the trailing mechanism in action (green line is the current price, the red one is the close price updated by trailing mechanism):

Trailing