OPEN-SOURCE SCRIPT
Peter Brandt's 3-Day Trailing Stop

Peter Brandt's 3-day trailing stop rule is a trend-following exit strategy where a sell signal is triggered after a stock has reached a new high, followed by a close below the low of that high day, and then a break below the low of the next day, which is called the "setup day". The rule can be reversed to exit a short position. For long positions, Day 1 is the "high day" with a new price high, Day 2 is the "setup day" where the price closes below the low of Day 1, and Day 3 is the "trigger day" where a sell is executed if the price falls below the low of the setup day.
Long exit signal
Day 1: High Day: — The stock makes a new high.
Day 2: Setup Day: — The stock closes below the low of Day 1. At this point, the exit signal is now active.
Day 3: Trigger Day: — A sell to close is triggered when the price breaks below the low of the "setup day" (Day 2).
Short exit signal
Day 1: Low Day: — The stock makes a new low.
Day 2: Setup Day: — The stock closes above the high of Day 1.
Day 3: Trigger Day: — A buy to close is triggered when the price breaks above the high of the "setup day" (Day 2).
Long exit signal
Day 1: High Day: — The stock makes a new high.
Day 2: Setup Day: — The stock closes below the low of Day 1. At this point, the exit signal is now active.
Day 3: Trigger Day: — A sell to close is triggered when the price breaks below the low of the "setup day" (Day 2).
Short exit signal
Day 1: Low Day: — The stock makes a new low.
Day 2: Setup Day: — The stock closes above the high of Day 1.
Day 3: Trigger Day: — A buy to close is triggered when the price breaks above the high of the "setup day" (Day 2).
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.