TIS_ATR_BarColor for TradingView

This indicator is available by subscription only. Subscribe on our TradingView page →Este indicador está disponible solo por suscripción. Suscribite desde nuestra página de TradingView →

SuperTrend en Pine Script con estado neutro: cuando la tendencia se da vuelta, las velas pasan a neutro en lugar de cambiar de lado, y la nueva dirección aparece recién cuando el precio rompe el máximo o mínimo reciente. Señales de largo, corto y salida, con alertas y compatible con TIS_Automator.

Pine Script SuperTrend with a neutral state: when the trend flips, the bars go neutral instead of switching sides, and a new direction is shown only once price breaks the recent swing high or low. Long, short and exit signals, alert-ready and compatible with TIS_Automator.
SKU: TV-DIVERGENCE-3 Categories: , Tag:

Description

TIS_ATR_BarColor para TradingView es un SuperTrend con estado neutro. Un SuperTrend común te pone del lado contrario apenas se cruza la banda, en la misma vela en la que terminó el movimiento anterior. Este te saca, y espera a que el precio confirme la nueva dirección antes de volver a mostrar una tendencia.

Cómo Funciona
Debajo está el motor de siempre: una media móvil desplazada por el ATR multiplicado por un factor, que genera una banda de arrastre que avanza con el movimiento y nunca retrocede. Un cierre más allá de la banda opuesta da vuelta la dirección interna. Esa parte es binaria y funciona como siempre.
Lo que se agrega encima es el estado que se muestra, y tiene tres valores. Cuando la dirección interna se da vuelta, el estado pasa a neutro, no al lado contrario. Desde neutro solo se resuelve cuando el cierre supera un nivel de confirmación: el máximo más alto de las últimas Swing_Strength velas para un largo, el mínimo más bajo de esa misma ventana para un corto, medidos hasta la vela anterior. Ese nivel se dibuja en el gráfico mientras el estado es neutro, así que se ve exactamente qué tiene que hacer el precio.
El nivel es una ventana móvil y no un pivote fijo, y ahí está la diferencia práctica. Se recalcula en cada vela, así que a medida que las velas altas que lo definieron salen de la ventana, el nivel baja hacia el precio. La confirmación es exigente justo después de un movimiento fuerte y se vuelve progresivamente más fácil cuanto más lateraliza el mercado. Un pivote fijo marcaría un precio y esperaría indefinidamente.
Una vez que el estado se resuelve en una dirección, se mantiene. Las velas tranquilas no lo desgastan. Solo vuelve a neutro cuando la tendencia interna se da vuelta de nuevo. Poniendo Swing_Strength en cero se elimina la capa neutra por completo y el indicador se comporta como un SuperTrend de dos estados, algo útil para comparar las dos lecturas en el mismo gráfico.
Todo se evalúa al cierre de la vela. Una vez cerrada la vela, su estado y sus marcas son definitivos y no cambian nunca.

Características
▸  Tres estados: alcista, bajista y un neutro explícito que significa que no hay nada que hacer
▸  Todo cambio de tendencia pasa por neutro, así que siempre hay una salida entre dos entradas opuestas
▸  Confirmación por ruptura de un extremo móvil, dibujado en el gráfico mientras el estado es neutro
▸  Velas pintadas según el estado, incluido el tramo neutro
▸  Diez tipos de media para el motor de bandas, desde Close hasta HMA, TEMA y LinReg
▸  Source libre, para construir toda la estructura sobre otro indicador en lugar del precio
▸  Interruptores independientes para las flechas de entrada y las marcas de salida
▸  Salidas de entrada, salida y estado seleccionables como fuente por otros scripts
▸  Alertas independientes para largo, corto y salida
▸  Modo de dos estados disponible poniendo Swing_Strength en cero

Parámetros
Parámetro Descripción
Source Serie sobre la que se construyen las medias. Puede seleccionarse cualquier plot del gráfico.
Lenght Período del ATR que dimensiona el desplazamiento de las bandas.
Swing_Strength Cantidad de velas cuyo máximo o mínimo tiene que romper el cierre para que el estado neutro se resuelva en una dirección, medido hasta la vela anterior. Cero desactiva el estado neutro.
Multiplier Multiplicador del ATR para las bandas de arrastre. Valores más altos las separan y hacen que el giro interno sea menos frecuente.
Smooth Período de la media seleccionada en Line_Type.
Line_Type Media sobre la que se construyen las bandas: Close, HighLow, Median, SMA, WMA, VWMA, TEMA, HMA, EMA o LinReg. HighLow usa el máximo más alto o el mínimo más bajo de la ventana Smooth según la dirección activa.
Paint_Entries Dibuja los triángulos donde el estado se resuelve en una dirección.
Paint_Exits Dibuja los cuadrados donde el estado vuelve a neutro.
Markers_Offset Distancia en ticks entre las marcas y las bandas.
Color_Buy / Color_Sell / Color_Neutral Colores de los tres estados, aplicados a las velas y a las marcas.

Salidas
▸  ATR Trailing Up y ATR Trailing Dn: la banda de arrastre de la dirección interna activa
▸  Swing: el nivel de confirmación, dibujado solo mientras el estado es neutro
▸  ATRBC Long, ATRBC Short y ATRBC Exit: una salida por evento, con valor solo en su propia vela
▸  ATRBC Trend: el estado como un único número, +1, 0 o -1
▸  Todas seleccionables desde el desplegable de fuente de otro script, más una alerta por cada evento

¿Para Quién Es?
Para quien opera a favor de la tendencia y termina dado vuelta una y otra vez por herramientas que siempre muestran un lado. En un rango, un indicador de dos estados entrega una dirección nueva cada pocas velas, con la misma seguridad con la que la muestra al inicio de un movimiento real. Acá esos giros te dejan en neutro y no aparece ninguna lectura direccional hasta que el precio rompe de verdad el rango reciente. Funciona como sistema completo, con los triángulos y el cuadrado marcando entradas y salidas, y también como filtro de régimen debajo de un setup más rápido, donde lo único que se toma de él es si el estado es alcista, bajista o neutro.

Listo para automatizar. TIS_ATR_BarColor es totalmente compatible con nuestro sistema TIS_Automator: seleccioná las salidas de largo y corto como fuentes de señal, o pasale la única salida de estado y dejá que un valor positivo abra largos y uno negativo abra cortos, definí tu objetivo y tu stop, y los cambios de estado se operan de punta a punta sin intervención manual.

TIS_ATR_BarColor for TradingView is a SuperTrend with a neutral state. A standard SuperTrend puts you on the opposite side the moment the band is crossed, on the same bar the previous move ended. This one takes you out instead, and waits for price to confirm the new direction before it reports a trend again.

How It Works
Underneath there is the engine you already know: a moving average offset by the ATR times a multiplier, producing a trailing band that ratchets with the move and never retreats. A close beyond the opposite band flips the internal direction. That part is binary and it flips the way it always did.
What sits on top is the reported state, and it has three values. When the internal direction flips, the state goes to neutral, not to the opposite side. From neutral it resolves only when the close clears a confirmation level: the highest high of the last Swing_Strength bars for a long, the lowest low of the same window for a short, measured up to the previous bar. That level is drawn on the chart while the state is neutral, so you can see exactly what price has to do.
The level is a rolling window rather than a fixed pivot, and that is what makes it practical. It is recalculated on every bar, so as the tall bars that set it drop out of the window the level moves toward price. Confirmation is demanding right after a strong move and progressively easier the longer the market consolidates. A fixed pivot would set one price and wait indefinitely.
Once the state resolves into a direction it stays there. Quiet bars do not erode it. It only returns to neutral when the internal trend flips again. Setting Swing_Strength to zero removes the neutral layer entirely and the indicator behaves as a plain two state SuperTrend, which is useful for comparing both readings on the same chart.
Everything is evaluated on the bar close. Once a bar has closed, its state and its markers are final and never change.

Key Features
▸  Three states: rising, falling and an explicit neutral that means there is nothing to do
▸  Every trend change passes through neutral, so there is always an exit between two opposite entries
▸  Confirmation by break of a rolling extreme, drawn on the chart while the state is neutral
▸  Bars painted in the color of the state, including the neutral stretch
▸  Ten average types for the band engine, from Close to HMA, TEMA and LinReg
▸  Free Source input, so the whole structure can be built on another indicator instead of price
▸  Independent switches for the entry triangles and the exit markers
▸  Entry, exit and state outputs selectable as sources by other scripts
▸  Independent alert conditions for long, short and exit
▸  Two state mode available by setting Swing_Strength to zero

Parameters
Parameter Description
Source Series the averages are built on. Any plot on the chart can be selected.
Lenght ATR period used to size the band offset.
Swing_Strength Number of bars whose high or low the close has to break before the neutral state resolves into a direction, measured up to the previous bar. Zero disables the neutral state.
Multiplier ATR multiplier for the trailing bands. Higher values widen them and make the internal flip rarer.
Smooth Period of the average selected in Line_Type.
Line_Type Average the bands are built from: Close, HighLow, Median, SMA, WMA, VWMA, TEMA, HMA, EMA or LinReg. HighLow uses the highest high or the lowest low of the Smooth window depending on the active direction.
Paint_Entries Draws the triangles where the state resolves into a direction.
Paint_Exits Draws the square markers where the state returns to neutral.
Markers_Offset Distance in ticks between the markers and the bands.
Color_Buy / Color_Sell / Color_Neutral Colors of the three states, applied to the bars and to the markers.

Outputs
▸  ATR Trailing Up and ATR Trailing Dn: the trailing band of the active internal direction
▸  Swing: the confirmation level, drawn only while the state is neutral
▸  ATRBC Long, ATRBC Short and ATRBC Exit: one output per event, carrying a value only on its own bar
▸  ATRBC Trend: the state as a single number, +1, 0 or -1
▸  All of them selectable from the source dropdown of another script, plus one alert condition per event

Who Is It For?
Traders who follow trends and keep getting turned around by tools that always show a side. In a range, a two state indicator hands you a new direction every few bars with the same confidence it shows at the start of a real move. Here those flips leave you in neutral and no directional reading appears until price actually breaks out of the recent range. It works as a standalone system, with the triangles and the square marking entries and exits, and just as well as a regime filter under a faster setup, where the only thing you take from it is whether the state is rising, falling or neutral.

Automation ready. TIS_ATR_BarColor is fully compatible with our TIS_Automator system: select the long and short outputs as signal sources, or feed it the single state output and let a positive value open longs and a negative one open shorts, set your target and stop, and the state changes can be traded end to end without manual intervention.

Opiniones

Aún no hay opiniones.

Solo los clientes que hayan comprado este producto pueden dejar una opinión.