SeaSide420

SS420FX

406 1 55
Two Moving_Average cross's & Daily_Candle cross
Based on Hull_MA
Developed by Alan Hull, it is an indicator, that solves the problem with making a moving average more reactive to current price activity. The Hull Moving Average almost eliminates lag and manages to improve smoothing.
The HMA manages to stick to rapid changes in price activity, as it has superior smoothing over a Simple Moving Average of the same period. The HMA employs Weighted Moving Averages ( WMA ) and dampens the smoothing effect. It can be calculated as follows:
HMA(n) = WMA (2*WMA(n/2) – WMA (n)), sqrt(n))
Remove from Favorite Scripts Add to Favorite Scripts
//by SeaSide420            ALERT FRIENDLY version of SS420FX
study("SS420FX", overlay=true)
z=input(title="HullMA Long",type=integer,defval=14)
dt = 0.0001
z2ma=2*wma(close[0],round(z/2))
zma=wma(close[0],z)
ziff=z2ma-zma
zqn=round(sqrt(z))
z2ma1=2*wma(close[1],round(z/2))
zma1=wma(close[1], z)
ziff1=z2ma1-zma1
zqn1=round(sqrt(z))
z1=wma(ziff,zqn)
z2=wma(ziff1,zqn)
z1e=z1>z2?green:black
z2e=z1>z2?black:red
z3e=z1>z2?green:red
n1e=plot(z1, title="HMA1", color=z1e, linewidth=2, offset=2)
n2e=plot(z2, title="HMA2", color=z2e, linewidth=2, offset=2)
fill(n1e, n2e, color=z3e, transp=80)
dt2=(security(tickerid, 'D', close)-security(tickerid, 'D', close[1]))/security(tickerid, 'D', close[1])
TrendingUp() => dt<dt2
TrendingDown() => dt>dt2
Uptrend() => TrendingUp() and TrendingDown()[1]
Downtrend() => TrendingDown() and TrendingUp()[1]
bgcolor(Uptrend() ? green : Downtrend() ? red : na,transp=75)
Buy = Uptrend()
Sell = Downtrend()
plotshape(Buy, title="buy", color=black, style=shape.arrowup, text="Buy", location=location.bottom)
plotshape(Sell, title="sell", color=black, style=shape.arrowdown, text="Sell", location=location.top)
Is there a way to only let this display the 2 most recent vertical lines? It seems to make the chart very busy.
Reply
United States
United Kingdom
India
Deutschland
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
Malaysia
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing Priority Support Ideas Published Followers Following Private Messages Chat Sign Out