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).
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının yaratıcısı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının yaratıcısı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.