OPEN-SOURCE SCRIPT

Sell to Buy / Buy to Sell

11 785
Sell to Buy / Buy to Sell — Momentum Shift Detector

The Sell to Buy / Buy to Sell indicator detects simple but powerful two-bar momentum shift patterns directly on your chart, offering early insights into potential reversals or strong breakout continuation.

🔎 How it works:

Sell to Buy (StB):

Previous candle (bar -1) is bearish

Current candle (bar 0) is bullish

The bullish candle closes above the high of the previous bearish candle

Confirmed only after bar close

Buy to Sell (BtS):

Previous candle (bar -1) is bullish

Current candle (bar 0) is bearish

The bearish candle closes below the low of the previous bullish candle

Confirmed only after bar close

🎯 Key Features:

✅ Pure price action logic — no indicators, no oscillators

✅ Immediate visual markers:

Green "StB" label for bullish momentum shifts

Red "BtS" label for bearish momentum shifts

✅ Full alert system to notify you in real-time when either pattern occurs

⚙ Who is this for?

Scalpers looking for short-term momentum shifts

Swing traders identifying potential reversals or breakout confirmations

Price action traders who want clean and objective setup detection

The Sell to Buy / Buy to Sell indicator is designed to give you clear and simple signals whenever the market shows decisive strength after a short-term opposite move — potentially marking the start of a new impulse.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.