#Important

Trailing Stop is something that happens locally, it is controlled by your Expert Advisor, not on the server automatically. You must keep your Expert Advisor running for this functionality to work.

In fxDreema block you have different kinds of Trailing Stop, but one thing is in common - you should place your Trailing Stop block somwehere, so it can run on every incoming tick.

#How Trailing Stop Works

The basic idea is to keep stop-loss of the trade at certain distance from the current price when the price is moving in our favor. When the price is moving backwards, stop-loss does not change. There are 2 main parameters - Trailing Stop and Trailing Step:

  • Trailing Stop - This is the target stop-loss size that we want to maintain, for example 40 pips.
  • Trailing Step - This tells us how often stop-loss is modified. If Step is small (and it could be even 0), then we have more frequent stop-loss modificacions. With bigger Step our stop-loss becomes more "lazy", but there are fewer requests to the server as well.

Now let's see how Trailing Stop, Trailing Step and the Current Price (either Ask or Bid) are related. This is the main logic that happens for Buy trade:

If (Current Price - Stop Loss) >= (Stop + Step), then move Stop Loss to (Current Price - Stop)

This pseudo-formula is not mathematically accurate, because some values are absolute and others are relative, but you should get it. Here is the meaning of its parameters anyway:

  • Current Price - Either Ask or Bid. By default it's Ask for Buy trades and Bid for Sell trades, but it can be changed.
  • Stop Loss - The stop-loss level of the trade. Not the relative size to the current price, but the actual level where the stop-loss line is.
  • Stop - The relative Trailing Stop size, for example 40 pips.
  • Step - The relative Trailing Step size, for example 1 pip.

In other words, the distance between the current price and the stop-loss line must be at least (Stop + Step) wide, so then stop-loss can be placed at Stop distance from the current price.

#Trailing Start

In fxDreema there is one extra parameter called Trailing Start. This creates a level of profit that must be realized first, and only then the stop-loss line can be modified by the block. You can imagine this treshold level like this:

  • Above the Trailing Start level evrything works
  • Below the Trailing Start level nothing works

#Trail What?

Imagine that the word "Stop" in Trailing Stop means either stop-loss or take-profit, because both are levels where the trade is stopped. In fxDreema you can trail not only stop-loss, but also take-profit, and there is parameter in the Trailing Stop block that can switch this behaviour.

#Examples