Step 7: Trailing Stoploss

You can not only install Stop Loss for the position but also periodically change its value. For example, you can pull it up when price changes to the profitable direction, thereby reducing the possible loss. Such pulling of the protective level is known as trailing stop. Traders often make use of trailing stops to lock in profits while minimizing their risk.

There are plenty of trailing stop variants: you can simply pull Stop Loss after price at a given distance. You can begin to move Stop Loss not immediately, but when the position reaches certain profitability then it is immediately moved to the level of break-even. This variant is standard and built into ESB. You can use custom trailing stop and define any desired trailing stop method by Expressions. For example, trailing stop can work based on some technical indicator like based on moving averages, that allows not to react to short-term price changes, based on Ichimoku indicator or more appropriate; and even on indicator Parabolic SAR (Stop and Reverse) that is not initially designed for this purpose.

For setup a trailing stop you need to set options of 3 blocks: Trailing Start, Trailing Step, Trailing Stop. In the first block, determine when trailing stop must start. In the second block, determine steps of trailing and in the third block determine how Stoploss moves in the direction of price movement.

  • Trailing Start:

As mentioned before, the first step of the trailing is to set a start condition. As this condition is met, the trailing process will start. There are many modes for determining conditions of start trailing.

Start After Fixed Distance: Start trailing after price moves fixed number of points in profit that is determined by “Fixed Distance” parameter

Start After Fixed Profit: Start trailing after price moves fixed profit (in the currency of the account) that is determined by “Fixed Profit” parameter

Start After N SL: In this case, ESB starts trailing after price moves in profit by a proportion of Stoploss. This proportion can be set by the “SL Ratio” parameter.

Start After N ATR Ratio: ESB starts trailing after price moves in profit by a proportion of ATR indicator. This method is very popular among traders. The proportion can be set by the ” ATR ratio(N)” parameter. There is also a parameter for setting the “ATR Period“.

Start When Expressions: If any above modes can’t handle your condition of trailing start, you can define “Buy/Sell Expression“.  The ESB checks these conditions and as they will be true, starts trailing.

  • Trailing Step

Suppose trailing is started; Now, how ESB must check the condition of trailing? Every time or after price moves enough in profit again? If trailing process needs to be continuous, then select “Continuous (No Step)” mode. But, if you want after ESB reduces the distance of Stoploss, wait until price moves a step, using other modes includes:

 Fixed Step: In this case, ESB will wait to price moves fixed number of points in profit and then moves Stoploss again. The size of the step can be determined by the “Fixed distance” parameter.

Stoploss Ratio: In this mode, the size of trailing steps is determined by a ratio of Stoploss. Suppose Stoploss is 40 pips and you set “SL Ratio” on 0.2, then step size is 2 pips that means every time price moves 2 pips in profit the ESB moves Stoploss and wait for next 2 pips.

N ATR: This mode determines the size of steps by a ratio of ATR indicator. ATR parameters are “ATR period” and “ATR ratio(N)”.

Custom Step Expressions: As mentioned before, you can define custom steps by writing “Buy/Sell Expressions”. ESB calculates these expressions and uses its values as the size of each step.

  • Trailing Stop

Just as trailing started and price moves one step in profit, the ESB moves Stoploss. In trailing stop block you can set how ESB should move Stoploss. ESB supports all types of trailing as described here.

Fixed Distance: Like other parts, ESB can move the Stoploss to a fixed distance from the current price. You can set it by the “Fixed Distance” parameter in points.

Profit Lock: In this case, you can set a percentage to the “Profit Lock” parameter and ESB move Stoploss to save that percentage of profit. Suppose you set profit lock on 70%. In every step, Stoploss is changed to lock 70% of the profit. In this case, if the price hits Stoploss, you lose only 30% of the profit.

By Moving Average: This is a popular method for tracking price movements. You can set a moving average indicator by “Mode“, “Applied Price“, “Shift” parameters and ESB moves Stoploss concerning this moving average. Note that the shift is candle’s number and should not be confused with the Moving Average shift.

N ATR: In this method, ESB uses a ratio of ATR indicator for trailing Stoploss. You can set ATR parameters by the “ATR period” and “ATR ratio“. In every step, ESB moves Stoploss to reach the distance of a ratio of ATR. For example, if ATR value is 0.00150 and the price is 1.16500 and the ATR ratio is set to 2.0 then for buy position Stoploss is set on 1.16500-2.0*0.00150=1.16200 and for sell position 1.16800.

By Expressions: If any above modes can’t handle your method of trailing stop, you can define “Buy/Sell Expression“.  The ESB calculates this expression and uses its result for the value of Stoploss.