Profitable Parabolic SARHello friends,
This script is a powerful, non-repainting optimizer for the classic Parabolic Stop and Reverse (PSAR) — one of J. Welles Wilder's most respected trend-following systems. It automatically finds and applies the most profitable PSAR settings for each instrument and timeframe, eliminating the need for manual parameter tuning.
🛠 How It Works
The indicator evaluates over 500 combinations of PSAR parameters using a decision tree–based algorithm under the hood .
Each configuration is backtested across the instrument's full price history, and when a more profitable setup is identified, the indicator seamlessly switches to those values in real time — while maintaining the original PSAR logic.
The Maximum parameter remains fixed since its impact on overall profitability is minimal compared to Start and Increment.
This self-adjusting approach removes the guesswork of parameter optimization and keeps the PSAR dynamically tuned to changing market regimes.
💡 Integrated Versions Explained
This all-in-one tool merges 3 complementary indicators:
• Profitable PSAR — A parameter optimizer that runs in a separate window below your main chart. It doesn't generate buy/sell signals directly but analyzes your specific asset and timeframe to find optimal settings. These are displayed as two lines (purple and orange), with optional labels showing the actual parameter values. Once identified, you can apply these optimal values manually to the standard PSAR.
• Self-Adjusting PSAR — A real-time overlay version that looks and behaves like the standard PSAR but automatically adjusts its parameters on the fly. It requires no manual configuration and can be paired with the Profitable PSAR to monitor which settings are currently active.
• Compact Self-Adjusting PSAR — A minimalist oscillator version that reflects the same adaptive logic through simple binary outputs: -1 for Sell and 1 for Buy. This variant is ideal for filtering or signal integration into other systems.
Together, they form a unified adaptive system that gives users both automation and interpretability — the best of both worlds.
🔥 Key Features
Adaptive optimization powered by a decision tree–based algorithm
Real-time switching to more profitable parameter configurations
Direction filter (Longs | Shorts | Longs & Shorts)
Optional analysis start date for focused historical testing
Commission customization for realistic performance modeling
Visual highlighting of parameter changes
Optional buy/sell labels and compact trend signal display
If you'd like access or have any questions, feel free to reach out to me directly via DM.
👋 Good luck and happy trading!
Skrip berbayar


















