OPEN-SOURCE SCRIPT
Market State Momentum Oscillator

Market State Momentum Oscillator (MSMO)
Overview
The MSMO combines three elements in one panel:
Momentum oscillator (gray/blue area with aqua signal line)
Market State filter (green/red background area)
Money Flow Index (orange line)
Works on all markets and all timeframes. Non-repainting at bar close.
Colors and meaning
Gray area: Momentum above 0 (bullish bias)
Blue area: Momentum below 0 (bearish bias)
Aqua line: Signal line smoothing the oscillator
Green background: Market state bullish (price above moving average)
Red background: Market state bearish (price below moving average)
Orange line: Money Flow Index (volume-weighted momentum)
How to use
Always wait for confirmation of the green or red market state before acting.
Trend alignment: Watch the slope of the Weekly and Daily 200 MA and Weekly and Daily 50 MA to understand higher-timeframe trend direction. Trade only in alignment with the broader trend.
Entries:
Long: Green state + gray histogram rising + MFI trending up
Short: Red state + blue histogram falling + MFI trending down
Exits: Histogram crossing back through 0, or state background flips against the position.
Users can add chart alerts on plot crossings if needed.
Inputs
Lengths for oscillator pivot, signal smoothing, state moving average, trend weight, return %, and Money Flow Index. Defaults work for most charts.
Note
Educational use only. Not financial advice.
Tags
trend, oscillator, market state, momentum, money flow, crypto, forex, stocks, indices, futures
Overview
The MSMO combines three elements in one panel:
Momentum oscillator (gray/blue area with aqua signal line)
Market State filter (green/red background area)
Money Flow Index (orange line)
Works on all markets and all timeframes. Non-repainting at bar close.
Colors and meaning
Gray area: Momentum above 0 (bullish bias)
Blue area: Momentum below 0 (bearish bias)
Aqua line: Signal line smoothing the oscillator
Green background: Market state bullish (price above moving average)
Red background: Market state bearish (price below moving average)
Orange line: Money Flow Index (volume-weighted momentum)
How to use
Always wait for confirmation of the green or red market state before acting.
Trend alignment: Watch the slope of the Weekly and Daily 200 MA and Weekly and Daily 50 MA to understand higher-timeframe trend direction. Trade only in alignment with the broader trend.
Entries:
Long: Green state + gray histogram rising + MFI trending up
Short: Red state + blue histogram falling + MFI trending down
Exits: Histogram crossing back through 0, or state background flips against the position.
Users can add chart alerts on plot crossings if needed.
Inputs
Lengths for oscillator pivot, signal smoothing, state moving average, trend weight, return %, and Money Flow Index. Defaults work for most charts.
Note
Educational use only. Not financial advice.
Tags
trend, oscillator, market state, momentum, money flow, crypto, forex, stocks, indices, futures
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
CJ
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
CJ
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.