OPEN-SOURCE SCRIPT
Atualizado MA Color-Change

Description
This indicator identifies continuation setups built around a pullback to a moving average followed by a directional shift in candle color and a breakout of the prior bar. A signal is generated when price interacts with a short-term moving average, then prints a color change where a green candle takes out the high of a prior red candle for longs, or a red candle takes out the low of a prior green candle for shorts. The signal candle must originate near the moving average, defined by its open being within an ATR-based distance from the average, ensuring the move begins at the area of interest rather than after price has already extended.
Trend context is incorporated through both slope and higher timeframe alignment. The short moving average must be trending in the direction of the trade, and an optional long moving average filter requires price and the short moving average to be positioned on the correct side of the long-term trend. An optional confirmation rule can require the signal candle to close through the body of the prior candle, increasing selectivity and filtering weaker moves. Signals can be configured to trigger only after the candle closes to prevent intrabar fluctuations, or in real time for earlier entries.
This creates a structured framework for identifying pullback continuation opportunities where price reacts at a key dynamic level, confirms direction through a color change and range expansion, and aligns with the prevailing trend.
This indicator identifies continuation setups built around a pullback to a moving average followed by a directional shift in candle color and a breakout of the prior bar. A signal is generated when price interacts with a short-term moving average, then prints a color change where a green candle takes out the high of a prior red candle for longs, or a red candle takes out the low of a prior green candle for shorts. The signal candle must originate near the moving average, defined by its open being within an ATR-based distance from the average, ensuring the move begins at the area of interest rather than after price has already extended.
Trend context is incorporated through both slope and higher timeframe alignment. The short moving average must be trending in the direction of the trade, and an optional long moving average filter requires price and the short moving average to be positioned on the correct side of the long-term trend. An optional confirmation rule can require the signal candle to close through the body of the prior candle, increasing selectivity and filtering weaker moves. Signals can be configured to trigger only after the candle closes to prevent intrabar fluctuations, or in real time for earlier entries.
This creates a structured framework for identifying pullback continuation opportunities where price reacts at a key dynamic level, confirms direction through a color change and range expansion, and aligns with the prevailing trend.
Notas de Lançamento
Internal logic updated.Defaults updated.
Notas de Lançamento
Keltner lines & user control added.One signal per trend option added.
Internal logic updated.
Default inputs updated.
Notas de Lançamento
Pine category updated.Current Model: Trend-following moving average indicator that identifies bullish and bearish continuation/reversal entries after major MA crossover trend shifts. Signals are generated when price pulls back near the slow moving average within an ATR-defined zone, then confirms direction with a candle color change and breakout takeout using either wick or close confirmation. Includes dynamic MA trend coloring, ATR bands, optional one-signal-per-trend filtering, and built-in buy/sell alerts for structured trend-entry setups.
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.