OPEN-SOURCE SCRIPT
Multi-Indicator Divergence Strategy + Martingale (v5)

This advanced trading strategy combines multiple technical indicators to identify powerful divergence patterns confirmed by trend analysis, enhanced with a martingale position sizing system for risk management.
- HMA-based trend filter to validate entry signals
- Customizable take profit and stop loss parameters
- Smart martingale system that increases position size after losses
- Direction lock mechanism that prevents consecutive losses in the same direction
- Comprehensive alert system with JSON-formatted messages for automation integration
How It Works
The strategy identifies trading opportunities when all three OBV show divergence, but only executes trades when the trend filter confirms the signal. After losing trades, the martingale system increases position size according to your specifications, while the direction lock prevents trading in the same direction as the previous loss until a winning trade resets the system.
IDEAL Setup Tested
- Symbol: BNBUSDT
- Timeframe: 5-minute
- Base position size: 1 BNB
- Take Profit multiplier: 1.5%
- Martingale factor: 2 (doubles position after each loss)
- Max martingale steps: 3 (maximum position size = 4x base)
If you're happy with the results, you can donate USDT to the following TRON (TRC20) address any amount: TQv3qnBUgfe43zUkSD5NERXpUScu9SxYPk
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.
For quick access on a chart, add this script to your favorites — learn more here.
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.
For quick access on a chart, add this script to your favorites — learn more here.
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.