A short tutorial (YouTube video transcript) by Adrian Reid explaining how Amibroker calculates and executes stop-loss signals during backtests and differences when using broker-placed, in-market stops. Covers how backtests record a stop level on trade entry (used for next-bar open exits) and notes common stop-loss calculations (percent-based, ATR-based).
Chapters
So when you run the the back test to generate your trading signals, if you in order, in order for amibroker to calculate and execute the stop loss, you've got a backtest your open trades watch list from the beginning of time until now. And so what happens is it comes the backtest goes through all of the trades in that in those stocks and it comes to the trade you took on the day it entered. It calculates the stop loss and it remembers that for the life of the trade. And if the stock hits that, then it'll give you a sell signal and it will say long max loss in the trade database. And if it's an because it's a next bar on open stop loss, that's your true. Your signal to sell on the next bar at the open. That's different to. So you can run the back just to trade like that. And you'd never need to plot the stop loss on the chart. Okay. It's only for esthetic purposes. If you had a system that had an in market stop loss, as in you place the stop with your broker. So if it touches it during the day, then it sells and you're out. That's different. You have to know where the level of the stop loss is because you've got to place it with the broker.
So if your system did that, then you would have to calculate it. Some stop losses could be a percentage one. So you know your open price, you multiply it by some percentage and that gives you your stop loss. Others are ATR based.