PROTECTED SOURCE SCRIPT
Daily ATR %

Input parameters:
The script calculates several parameters:
THE LOGIC OF CALCULATING THE ATR (the bar of the trading day is not taken into account):
1. Calculate the Median ATR for X previous bars.
2. We calculate the ATR for Y of the previous bars,
taking only those bars that fulfill the condition:
Median ATR * 50% < N < Median ATR * 200%
, i.e. we do not take into account bars that are less than the Median ATR by 2 times, and bars that are more than the Median ATR by 2 times
- Number of bars for ATR (Y) - the number of bars to calculate the average ATR
- Number of bars for median ATR (X) - the number of bars to calculate the median ATR, should be >= Number of bars for ATR
- Stop ATK share in % - to calculate Stop Loss in % of ATR
- Calculate the passed ATR from the previous day close - calculation of the passed ATR from:
True = closing prices of the previous day
False = from High/Low of the current day
The script calculates several parameters:
- Decimal - the number of digits after the fractional part of the price
- Close % - how much the previous day closed as a percentage of High/Low
- Median - the median value for the X previous bars.
- ATR is the average value for Y bars
- C_ATR - passed ATR for the current day
- C_ATR% - passed ATR in % excellent calculated
- Stop - the calculated size of the Stop Loss from ATR
THE LOGIC OF CALCULATING THE ATR (the bar of the trading day is not taken into account):
1. Calculate the Median ATR for X previous bars.
2. We calculate the ATR for Y of the previous bars,
taking only those bars that fulfill the condition:
Median ATR * 50% < N < Median ATR * 200%
, i.e. we do not take into account bars that are less than the Median ATR by 2 times, and bars that are more than the Median ATR by 2 times
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Korumalı komut dosyası
Bu komut dosyası kapalı kaynak olarak yayınlanmaktadır. Ancak, özgürce ve herhangi bir sınırlama olmaksızın kullanabilirsiniz – daha fazla bilgi burada.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.