OPEN-SOURCE SCRIPT
MAST

What is the MAST Trend Indicator?
The MAST (Moving Average SuperTrend) Trend indicator is a systematic momentum-following system designed to filter market noise and isolate clean macro trends. By blending a structural volatility filter (Supertrend) with a localized momentum line (SMA/EMA), it maps out clear high-probability market cycles while ignoring minor counter-trend fluctuations.
Core Components & Mechanics
The Core Matrix Engine: The indicator runs a continuous matrix comparison between where the closing price sits relative to both your selected Moving Average (the baseline momentum) and the Supertrend band (the volatility boundary).
Color-Coded Market States: The ribbon cloud dynamically fills your chart screen using distinct color states to map structural health:
Green (Bullish Expansion): Price rules above both the MA and the Supertrend. This signals a clean long trend.
Red (Bearish Expansion): Price drops below both metrics, indicating active downward momentum.
Blue / Purple (Transition States): These warning colors flag compression or potential distribution phases where the MA and Supertrend conflict, warning you to avoid forcing positions in a choppy environment.
Volume Validation Guard: Trend changes must pass an institutional volume filter. If a trend flip occurs on low volume, the script strips out the buy/sell signal to protect you from retail traps and false breakouts.
Optimal Use Cases
The MAST system is highly effective for intraday trend-riding in fast-moving markets like Nifty, Bank Nifty, and Index Futures. It helps you identify when a market shifts from a range-bound state into an explosive directional trend.
The MAST (Moving Average SuperTrend) Trend indicator is a systematic momentum-following system designed to filter market noise and isolate clean macro trends. By blending a structural volatility filter (Supertrend) with a localized momentum line (SMA/EMA), it maps out clear high-probability market cycles while ignoring minor counter-trend fluctuations.
Core Components & Mechanics
The Core Matrix Engine: The indicator runs a continuous matrix comparison between where the closing price sits relative to both your selected Moving Average (the baseline momentum) and the Supertrend band (the volatility boundary).
Color-Coded Market States: The ribbon cloud dynamically fills your chart screen using distinct color states to map structural health:
Green (Bullish Expansion): Price rules above both the MA and the Supertrend. This signals a clean long trend.
Red (Bearish Expansion): Price drops below both metrics, indicating active downward momentum.
Blue / Purple (Transition States): These warning colors flag compression or potential distribution phases where the MA and Supertrend conflict, warning you to avoid forcing positions in a choppy environment.
Volume Validation Guard: Trend changes must pass an institutional volume filter. If a trend flip occurs on low volume, the script strips out the buy/sell signal to protect you from retail traps and false breakouts.
Optimal Use Cases
The MAST system is highly effective for intraday trend-riding in fast-moving markets like Nifty, Bank Nifty, and Index Futures. It helps you identify when a market shifts from a range-bound state into an explosive directional trend.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.