OPEN-SOURCE SCRIPT
Buy Sell Magic Rework

📌 Purpose
This script is a reworked version of the Parabolic SAR strategy, with an optional ZigZag filter to confirm reversal points.
It helps traders identify potential trend reversals with reduced noise compared to the standard SAR.
🧠 How It Works
1. Parabolic SAR Flip Signals
Buy Signal: Triggered when SAR flips from above price to below price.
Sell Signal: Triggered when SAR flips from below price to above price.
(Default SAR parameters: Start = 0.02, Increment = 0.02, Max = 0.2)
2. ZigZag Filter (Optional)
When Use ZigZag Filter = true:
The script confirms reversals only at significant pivots (swing highs/lows) detected by the ZigZag algorithm over the selected ZigZag Period (default = 14 bars).
Buy Signal: Appears only when a new pivot low is detected.
Sell Signal: Appears only when a new pivot high is detected.
3. Trade-Off
Without ZigZag: More signals, more noise.
With ZigZag: Fewer signals, but stronger confirmation and reduced false entries.
📈 How to Use
Signals appear as green arrows for buy and red arrows for sell.
Works well for:
Trend reversal detection.
Swing trading confirmation.
Filtering entries for other systems.
Recommended Timeframes: 15m, 1h, 4h.
Markets: Forex, Crypto, Stocks.
⚙️ Inputs
ZigZag Period (bars for pivot detection)
SAR Start / Increment / Max (SAR parameters)
Use ZigZag Filter (toggle for confirmation)
⚠️ Disclaimer
This script is for educational purposes only. It does not constitute financial advice.
Always test thoroughly before live trading.
This script is a reworked version of the Parabolic SAR strategy, with an optional ZigZag filter to confirm reversal points.
It helps traders identify potential trend reversals with reduced noise compared to the standard SAR.
🧠 How It Works
1. Parabolic SAR Flip Signals
Buy Signal: Triggered when SAR flips from above price to below price.
Sell Signal: Triggered when SAR flips from below price to above price.
(Default SAR parameters: Start = 0.02, Increment = 0.02, Max = 0.2)
2. ZigZag Filter (Optional)
When Use ZigZag Filter = true:
The script confirms reversals only at significant pivots (swing highs/lows) detected by the ZigZag algorithm over the selected ZigZag Period (default = 14 bars).
Buy Signal: Appears only when a new pivot low is detected.
Sell Signal: Appears only when a new pivot high is detected.
3. Trade-Off
Without ZigZag: More signals, more noise.
With ZigZag: Fewer signals, but stronger confirmation and reduced false entries.
📈 How to Use
Signals appear as green arrows for buy and red arrows for sell.
Works well for:
Trend reversal detection.
Swing trading confirmation.
Filtering entries for other systems.
Recommended Timeframes: 15m, 1h, 4h.
Markets: Forex, Crypto, Stocks.
⚙️ Inputs
ZigZag Period (bars for pivot detection)
SAR Start / Increment / Max (SAR parameters)
Use ZigZag Filter (toggle for confirmation)
⚠️ Disclaimer
This script is for educational purposes only. It does not constitute financial advice.
Always test thoroughly before live trading.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.