OPEN-SOURCE SCRIPT
eBacktesting - Learning: RSI Divergences

eBacktesting - Learning: RSI Divergences is meant to train your eye to spot when a trend is losing momentum before price fully turns.
How to study it (step-by-step)
1. Start with the trend
- First decide if price is generally trending up or down (higher highs / higher lows vs lower highs / lower lows).
- Divergences matter most after a trend has been running for a while.
2. Look for the “mismatch”
- Bearish divergence: price prints higher highs, but RSI prints lower highs.
- This often shows up near the end of a strong bullish run, when buyers are still pushing price up but with less momentum.
- Bullish divergence: price prints lower lows, but RSI prints higher lows.
- This can show up near the end of a bearish move, when selling pressure is fading.
3. Treat divergence as a warning, not an entry
- The key lesson: divergence often signals trend weakness, not an instant reversal.
- After a divergence appears, study what happens next: stalling, ranging, a pullback, or a full reversal.
4. Add simple confirmation
- Practice waiting for something obvious after the divergence:
a break of a small support/resistance level,
a shift in swing structure,
or a clear rejection candle from a key area.
- This helps you avoid taking every divergence as a trade signal.
5. Use it inside eBacktesting (best practice)
- Replay the chart and pause on each divergence mark.
- Log:
Where it happened (after a long run or in the middle of chop?),
Whether price stalled first or reversed immediately,
What confirmation appeared (if any),
The best “invalidation” idea (what would prove you wrong?).
- Over time you’ll see which divergences are meaningful for your market and session, and which ones are noise.
These indicators are built to pair perfectly with the eBacktesting extension, where traders can practice these concepts step-by-step. Backtesting concepts visually like this is one of the fastest ways to learn, build confidence, and improve trading performance.
Educational use only. Not financial advice.
How to study it (step-by-step)
1. Start with the trend
- First decide if price is generally trending up or down (higher highs / higher lows vs lower highs / lower lows).
- Divergences matter most after a trend has been running for a while.
2. Look for the “mismatch”
- Bearish divergence: price prints higher highs, but RSI prints lower highs.
- This often shows up near the end of a strong bullish run, when buyers are still pushing price up but with less momentum.
- Bullish divergence: price prints lower lows, but RSI prints higher lows.
- This can show up near the end of a bearish move, when selling pressure is fading.
3. Treat divergence as a warning, not an entry
- The key lesson: divergence often signals trend weakness, not an instant reversal.
- After a divergence appears, study what happens next: stalling, ranging, a pullback, or a full reversal.
4. Add simple confirmation
- Practice waiting for something obvious after the divergence:
a break of a small support/resistance level,
a shift in swing structure,
or a clear rejection candle from a key area.
- This helps you avoid taking every divergence as a trade signal.
5. Use it inside eBacktesting (best practice)
- Replay the chart and pause on each divergence mark.
- Log:
Where it happened (after a long run or in the middle of chop?),
Whether price stalled first or reversed immediately,
What confirmation appeared (if any),
The best “invalidation” idea (what would prove you wrong?).
- Over time you’ll see which divergences are meaningful for your market and session, and which ones are noise.
These indicators are built to pair perfectly with the eBacktesting extension, where traders can practice these concepts step-by-step. Backtesting concepts visually like this is one of the fastest ways to learn, build confidence, and improve trading performance.
Educational use only. Not financial advice.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
eBacktesting.com
--------
Check out the most complete backtesting suite integrated on TradingView!
Join our free Discord group for more info, Q&A, and education:
discord.gg/kJSmwSxBpW
--------
Check out the most complete backtesting suite integrated on TradingView!
Join our free Discord group for more info, Q&A, and education:
discord.gg/kJSmwSxBpW
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
eBacktesting.com
--------
Check out the most complete backtesting suite integrated on TradingView!
Join our free Discord group for more info, Q&A, and education:
discord.gg/kJSmwSxBpW
--------
Check out the most complete backtesting suite integrated on TradingView!
Join our free Discord group for more info, Q&A, and education:
discord.gg/kJSmwSxBpW
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.