The moving target lives in the Continuous trade protection block. While a trade is open, it moves your target to follow a line, such as a moving average or the edge of a band. It works the same way in Backtest and in the Bot.
What you set
- The line. A moving average, a band such as Bollinger or Keltner, the parabolic SAR, the supertrend, the zigzag, the HiLo activator, the linear regression intercept, the time series forecast, the standard error bands, the standard deviation channel, the acceleration bands, the TWAP, Ehlers' super smoother, decycler, Butterworth, Gaussian or Laguerre filter, the midprice, or the ADR bands (1 day, on candles of 15 minutes or shorter). MAMA, the instantaneous trendline, the Alligator and the Chande Kroll stop have more than one line, so a target can't follow them.
- The chart it reads. How many minutes per candle.
- Its numbers. The length, and a band's width, as the line needs them. The line reads the last 6 days of candles, in Backtest and in the Bot alike, so it starts from the same value in both. A line that needs more history than that can't be chosen.
- Which line. The middle, or a band's upper or lower edge.
- The room. How many ticks in front of the line the target sits, toward your entry.
How it moves
At the close of each candle on your chart, the target moves to the line, less your room. It can come nearer as well as go further, as the line does. Between closes it stays put.
The target stays where it was for that candle when:
- the line is still warming up,
- the line is at or behind your entry,
- the candle that just closed already reached the new price, or
- that candle reached your current target, which then filled.
In the Bot
The Bot changes the price of the target order already at your broker. It never cancels it to place another. If your broker refuses the change, the old target stays and keeps working, and the Bot tries again a moment later. Your stop is never touched by it.
If a trade has no target order at your broker, the Bot can't move one. It leaves the trade as it is and shows an alert, because that trade won't match your backtest.
If the Bot restarts while a trade has been open for many days, it may rebuild the line from less history than your backtest used. The target can then sit at a slightly different price. With a 30-day warm-up, this only happens to a trade held for more than 24 days.
Every number is yours
Nothing has a default. It can't be used with banking, which also moves the target. It also can't be used with a partial close, take-profit zones or a two-stage target, because those split your position across more than one target.