asenski

Minimum Average True Range

I use ATR a lot when designing trading strategies, this way the strategy adjusts to the instrument in most cases instead of me plugging in special numbers.

However, ATR itself could get spiked by some violent moves. For this I have created MinATR which I am publishing here.

It is effectively ATR + minimum ATR over the last "Min Length" bars. (this is a parameter which I have defaulted to 50).

So use this the same way you use ATR, but it will also show the min ATR over the last "Min Length" periods.
Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con las Normas internas. Puede marcarlo como favorito para usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?
Follow me for some interesting Risk:Reward ideas. I have a purely technical analysis approach. I mainly watch and trade US stocks that have weekly options. This is not an investment advice, do your own due diligence.

Comentarios

I used it and liked it. I have one observation. minATR is not taking today's price range into consideration as minimum ATR even though today is the lowest in the selected time length. Any idea why it is not considering current date price range in determining the minimum ATR?
Responder
asenski GreatStockMarketer
@GreatStockMarketer, Good observation!

I do normally make calculations for the day, I want them to be constant, so I only do calculations on closed bars, not currently developing ones.
Otherwise at the open you will often have a super minimal ATR, even though the price could move significantly that day.

That said I am not actually doing anything special other than taking the ``lowest(atr, minlength)``.

In general the goal of this indicator is not to find sudden changes, but rather find a "multiplier" we can use to have consistent calculations for stops/profit targets/etc.

Can you post a chart, or tell me the stock symbol you were looking at so I can take a peek as well?

Cheers!
Responder
@asenski, Thanks for the reply. I checked around 9 PM in the night thinking that current bar is closed. Let me try to get one example and post it.
Responder
asenski GreatStockMarketer
@GreatStockMarketer, just to clarify one thing:

I actually use the prior day's ATR / MinATR, which is set in stone. I think as it is right now the current day does update as it unfolds, but you don't really want to look at that.

If you're looking for momentum indicators - two things 1) look at lower time frame, not daily, and 2) use actual momentum indicators such as RSI.
Responder
This looks good. I agree with your thoughts on using the ATR in everything. I use it the same, as kind of a universal tape measure. I will be interested to see any other indicators you create.
Responder
asenski stevenwalter0
@stevenwalter0, Thank you, Steven! I've done some really interesting indicators over the years, but it's a challenge to port them to Pine Script.

Good news is that Pine Script seems to be constantly improving and may be one day I'll be able to implement some of the more advanced stuff in here as well.

Cheers!
Responder
@asenski, Ok that sounds great, i'll be following you. Yes we've gotten the array function and now can have dynamic lengths used in functions so I'm excited to try out new ideas. Thanks for your additions!
Responder
I'll be using this one, thanks Asen!
Responder
asenski IvanLabrie
@IvanLabrie, Thank you, Ivan! Glad you find it useful!
Responder
Inicio Analizador de acciones Analizador de Forex Crypto Screener Calendario económico Sobre Funcionalidades del gráfico Precios Recomendar a un amigo Normas Centro de ayuda Soluciones broker y sitio web Widgets Soluciones gráficas Biblioteca de gráficos ligeros Blog y Noticias Twitter
Perfil Opciones de configuración del perfil Cuenta y facturación Amigos referidos Monedas Mis solicitudes de asistencia Centro de ayuda Mensajes privados Chat Cerrar sesión