OPEN-SOURCE SCRIPT
Script_Algo - Pivot Trend Rider Strategy

📌 This strategy aims to enter a trade in the direction of the trend, catching a reversal point at the end of a correction.
The script is unique due to the combination of three key elements:
🔹 Detection of reversal points through searching for local lows and highs
🔹 Trend filter based on SMA for trading only in the trend direction
🔹 Adaptive risk management using ATR for dynamic stop-losses and take-profits
This allows the strategy to work effectively in various market conditions, minimizing false signals and adapting to market volatility.
⚙️ Principle of Operation
The strategy is based on the following logical components:
📈 Entry Signals:
Long: when a local low (pivot low) is detected in an uptrend
Short: when a local high (pivot high) is detected in a downtrend
📉 Position Management:
Stop-loss and take-profit are calculated based on ATR
Automatic reverse switching when an opposite signal appears
📊 Trend Filter:
Uses SMA to determine trend direction (can be disabled if needed)
🔧 Default Settings
Pivot detection: 11 bars
SMA filter length: 16 periods
ATR period: 14
SL multiplier: 2.5
TP multiplier: 10
Trend filter: enabled
🕒 Usage Recommendations
Timeframe: from 1 hour and above
Assets: cryptocurrency pairs, stocks
🤖 Trading Automation
This script is fully ready for integration with cryptocurrency exchanges via Webhook.
📊 Backtest Results
As seen from testing results, over 4.5 years this strategy could have potentially generated about $5000 profit or 50% of initial capital on the NAERUSDT crypto pair on the 4H timeframe.
Position size: $1000
Max drawdown: $1400
Total trades: 376
Win rate: 38%
Profit factor: 1.34
⚠️ Disclaimer
Please note that the results of the strategy are not guaranteed to repeat in the future. The market constantly changes, and no algorithm can predict exactly how an asset will behave.
The author of this strategy is not responsible for any financial losses associated with using this script.
All trading decisions are made solely by the user.
Trading financial markets carries high risks and can lead to loss of your investments.
Before using the strategy, it is strongly recommended to:
✅ Backtest the strategy on historical data
✅ Start with small trading volumes
✅ Use only risk capital you are ready to lose
✅ Fully understand how the strategy works
🔮 Further Development
The strategy will continue to evolve and improve. Planned updates include:
Adding additional filters to reduce false signals
Optimizing position management algorithms
Expanding functionality for various market conditions
💡 Wishing everyone good luck and profitable trading!
📈 May your charts be green and your portfolios keep growing!
Developed by Script_Algo | MIT License | Version 1.0
The script is unique due to the combination of three key elements:
🔹 Detection of reversal points through searching for local lows and highs
🔹 Trend filter based on SMA for trading only in the trend direction
🔹 Adaptive risk management using ATR for dynamic stop-losses and take-profits
This allows the strategy to work effectively in various market conditions, minimizing false signals and adapting to market volatility.
⚙️ Principle of Operation
The strategy is based on the following logical components:
📈 Entry Signals:
Long: when a local low (pivot low) is detected in an uptrend
Short: when a local high (pivot high) is detected in a downtrend
📉 Position Management:
Stop-loss and take-profit are calculated based on ATR
Automatic reverse switching when an opposite signal appears
📊 Trend Filter:
Uses SMA to determine trend direction (can be disabled if needed)
🔧 Default Settings
Pivot detection: 11 bars
SMA filter length: 16 periods
ATR period: 14
SL multiplier: 2.5
TP multiplier: 10
Trend filter: enabled
🕒 Usage Recommendations
Timeframe: from 1 hour and above
Assets: cryptocurrency pairs, stocks
🤖 Trading Automation
This script is fully ready for integration with cryptocurrency exchanges via Webhook.
📊 Backtest Results
As seen from testing results, over 4.5 years this strategy could have potentially generated about $5000 profit or 50% of initial capital on the NAERUSDT crypto pair on the 4H timeframe.
Position size: $1000
Max drawdown: $1400
Total trades: 376
Win rate: 38%
Profit factor: 1.34
⚠️ Disclaimer
Please note that the results of the strategy are not guaranteed to repeat in the future. The market constantly changes, and no algorithm can predict exactly how an asset will behave.
The author of this strategy is not responsible for any financial losses associated with using this script.
All trading decisions are made solely by the user.
Trading financial markets carries high risks and can lead to loss of your investments.
Before using the strategy, it is strongly recommended to:
✅ Backtest the strategy on historical data
✅ Start with small trading volumes
✅ Use only risk capital you are ready to lose
✅ Fully understand how the strategy works
🔮 Further Development
The strategy will continue to evolve and improve. Planned updates include:
Adding additional filters to reduce false signals
Optimizing position management algorithms
Expanding functionality for various market conditions
💡 Wishing everyone good luck and profitable trading!
📈 May your charts be green and your portfolios keep growing!
Developed by Script_Algo | MIT License | Version 1.0
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.