TradingView
jessekr
١٤ كانون الأول ديسمبر ٢٠١٨ ٢١:٢١
ATR + SMA
FX:EURAUD
Euro Fx/Australian Dollar
FXCM
الوصف
⋅
١٤ كانون الأول ديسمبر ٢٠١٨ ٢١:٢١
Just a simple script that provides you with an ATR line and a corresponding SMA line.
Volume
ATR
sma
التعليقات
vkant331
⋅
١٣ شباط فبراير ٢٠٢٣ ٠٨:٣٩
Plese help me ATR band stretagy for aply
vkant331
⋅
١٣ شباط فبراير ٢٠٢٣ ٠٥:٤٥
study("ATR Band Strategy")
// Define the ATR length and multiplier
atrLength = input(title="ATR Length", type=integer, defval=14)
atrMultiplier = input(title="ATR Multiplier", type=float, defval=1.5)
// Calculate the ATR
atr = trueRange(atrLength)
// Calculate the upper and lower bands
upperBand = highest(high, atrLength) + atrMultiplier * atr
lowerBand = lowest(low, atrLength) - atrMultiplier * atr
// Plot the bands
plot(upperBand, title="Upper Band", color=red, linewidth=2)
plot(lowerBand, title="Lower Band", color=green, linewidth=2)
// Buy signal
buy = crossover(close, lowerBand)
// Sell signal
sell = crossunder(close, upperBand)
// Plot the signals
plotshape(buy, style=shape.arrowup, location=location.belowbar, color=green, text="Buy")
plotshape(sell, style=shape.arrowdown, location=location.abovebar, color=red, text="Sell")
vkant331
⋅
١٣ شباط فبراير ٢٠٢٣ ٠٨:٣٩
@vkant331
,
المزيد