RicardoSantos

[RS]Normalized Moving Average V0

Experimental: using extreme donchians average to normalize price value.
method for Double Normalized MA also on the code:
NMA(NMA1, NMA2, LENGTH)
Remove from Favorite Scripts Add to Favorite Scripts
study("[RS]Normalized Moving Average V0", overlay=true)
L = input(4)
NormalizedMA(_open, _close, _length)=>avg(highest(max(_open,_close), _length), lowest(min(_open,_close), _length))
NMA = NormalizedMA(open, close, L)
NMA2 = NormalizedMA(open, close, L*2)
DNMA = NormalizedMA(NMA, NMA2, L)
plot(NMA, color=gray)
plot(NMA2, color=gray)
plot(DNMA, color=black)

ShowSignals = input(false)
SELCON = cross(hlc3,DNMA) and hlc3 <= DNMA
BUYCON = cross(hlc3,DNMA) and hlc3 >= DNMA
plotshape(not ShowSignals ? na : SELCON, style=shape.labeldown, location=location.abovebar, text='[S]\n\n\n', color=silver, textcolor=maroon, transp=0)
plotshape(not ShowSignals ? na : BUYCON, style=shape.labelup, location=location.belowbar, text='\n\n\n[B]', color=silver, textcolor=green, transp=0)
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out