Peterbolic SAR

The Peterbolic SAR indicator is based on Peter Brandt's 3 Day Trailing Stop Rule. The yellow triangles indicate setup candles, and the green and red triangles represent trigger candles to buy and sell, respectively.

Sawcruhteez asked me to create the code for this SAR . Gabriel Harber came up with the name for the SAR . Peter Brandt gave his permission to use his name.

For more information, see Sawcruhteez Streamz: Live Coaching Sessionz with Gabriel Harber - Trading Peterbolic SAR

and Peter Brandt's original description of the 3DTSR
發布通知: Overview

The Peterbolic SAR was developed using the 3 Day Rule that Peter Brandt outlined on page 50 of Diary of a Commodity Trader.

Below is the exact quote from the book:

“The first step to the exit strategy is to identify the highest day of the move (bull trend). Of course, it will change as new highs are made. The high day in the Dow was August 28 (2009). The setup day occurs on any day a market closes below the low of the high day. This occurred on August 31. The trigger and exit then takes place when the low of the setup day is penetrated. This occurred on September 1.”

If it is a bear trend then the setup occurs any day a market closes above the high of the low day. The trigger then takes place when the high of the setup day is penetrated. Note that Peter uses this on the daily chart but we have found it to be very useful on all time frames.

It was designed as a trailing stop loss system, but I believe it can be used as a SAR (Stop And Reversal). Instead of simply exiting a position this can be used to signal a full reversal (cover long & immediately go short or cover short and immediately go long). As a result it has been named the Peterbolic SAR instead of the 3 Day Rule.

As a result if trading this system one would expect to always be either long or short. Nevertheless that isn’t how it has to be traded. It would certainly be feasible to only take long signals when the trend is bullish and vice versa. It can also be used exclusively as a stop loss, as Peter intended.

In the past Sawcruhteez has relied on Welles Wilder’s Parabolic SAR to trail stop losses but has never been able to use that as a full Stop and Reversal system, as Welles intended. After preliminary backtesting Sawcruhteez is inclined to believe that the Peterbolic SAR will be a better way to trail stops as well as being a profitable to signal entries in the opposite direction.


Yellow triangle is the setup. If it is below the candle it is a buy setup. If it is above the candle it is a sell setup.

Red triangle is the sell trigger. Green triangle is the buy trigger.

If a setup is not followed by a trigger then there is no exit or entry signaled. Signals only occur on the trigger. Note that the trigger does not require a close above or below the setup, those levels only need to be penetrated intra candle. Therefore hard stop losses can be placed after the setup occurs.

If it is a sell setup then a stop loss for longs can be entered one tick below the low of the setup candle. If it is a buy setup then a hard stop loss for shorts can be placed one tick above the high of the setup candle.

If trading as a full Stop And Reversal then stop loss orders would be entered for 200% of the current position size. On the large majority of crypto exchanges this would close out the existing position and enter equal exposure in the other direction, otherwise known as flipping the position.
發布通知: Fix - The labels for style options "Target to Sell", "Setup to Sell", "Target to Buy", and "Setup to Buy" have been corrected
發布通知: Fix for a bug that Sawcruhteez found
Issue #3

Description of bug

Say there's a downtrend with a setup candle in play. If, in a candle following the setup candle, there is first a price that triggers an uptrend and then a price that is higher than the previous high for the downtrend, then this is treated as a new high for the downtrend instead of as a trigger for the change to an uptrend.

Newly implemented rule

If a trigger happens in a candle, even if there's a new extreme point, too, then the candle is a trigger candle and the trend changes

Import tool

This release also includes an import tool written in Rust that allows the PineScript functions to be maintained separately from template scripts. I run this import tool to generate the released scripts. Anywhere there's a line with an import statement in the templates, a function is plugged in from a function file





Great job guys!! Tried it on DAX on 15M and 5M in combination with a trend-system and worked very well, even the short signals in an uptrend.
Do you know how I can make the triangles bigger? I tried to set an alert but their is no rule to get the alarm only when the setup or trigger candle started. Its only possible to combine it with a price or a cross or...? Any idea to get the alert only on the setup or trigger candle?

Thx for your help!

Best SAR ever! (so far ;-)
+3 回覆
Seems to be some bugs where the sell signal shows candles after the setup,when it should show up after the setup candle because it broke the low or high of the setup candle.
+2 回覆
casey_bowman Majorgainz
@Majorgainz, Thank you! Please give an exact case with details on the candle highs, lows, opens, and closes in a sequence covering what you are seeing. With an example in hand of where it breaks, I can confirm and then address any bugs.
+4 回覆
d1ffuser casey_bowman
@casey_bowman, 6th of August 2019 printed a sell setup (4h, 2:00, XBTUSD) which was followed by a lower sell setup. Happens a lot on the 4h chart..
+1 回覆
@d1ffuser, Please include the full information I requested, that is, all of the highs, lows, opens, and closes in the sequence from the high (or low) candle through the setup candles in question. I'm maxed out on my charts and don't want to delete any
d1ffuser casey_bowman
@casey_bowman, sorry, that's just too much work. look at any 4h chart and you'll find plenty of instances of failed signals...
d1ffuser casey_bowman
@casey_bowman, In the sawcruhteez video from your description, there is a buy setup candle followed by a higher setup candle, which should have been a buy trigger. (timestamp 12:50)