[RS]Heiken Ashi Cloud V1

Update: changed were the label shows up, it now shows on the candle of the crossover of (open X close), before it was at the candles with no wicks in opposite direction this will allow for looking for earlier entrys.
Remove from Favorite Scripts Add to Favorite Scripts
study(title="[RS]Heiken Ashi Cloud V1", shorttitle="[RS]HACK.V1", overlay=true) 
useAlternativeTF = input(false)
AlternativeTF = input("D")
TF = useAlternativeTF ? AlternativeTF : period
Internal_Smooth = input(1)
External_Smooth = input(1)

HA_ticker = heikenashi(tickerid)
HA_open = sma(security(HA_ticker, TF, sma(open, Internal_Smooth)), External_Smooth)
HA_close = sma(security(HA_ticker, TF, sma(close, Internal_Smooth)), External_Smooth)
HA_high = sma(security(HA_ticker, TF, sma(high, Internal_Smooth)), External_Smooth)
HA_low = sma(security(HA_ticker, TF, sma(low, Internal_Smooth)), External_Smooth)

HAO = plot(HA_open, color=maroon, linewidth=2)
HAC = plot(HA_close, color=green, linewidth=2)
HAH = plot(HA_high, color=silver, linewidth=1)
HAL = plot(HA_low, color=silver, linewidth=1)

fill(HAH,HAL,color=gray, transp=85)
fill(HAO,HAC,color=blue, transp=85)

//  ||---   Signals:
showLabels = input(true)
SEL0=cross(HA_open, HA_close)[1] and HA_open >= HA_close
BUY0=cross(HA_open, HA_close)[1] and HA_open <= HA_close

plotshape(not showLabels ? na : (SEL0 ? HA_high : na), style=shape.labeldown, color=maroon, location=location.absolute, textcolor=black, text='Bears\nIn Control')
plotshape(not showLabels ? na : (BUY0 ? HA_low : na), style=shape.labelup, color=green, location=location.absolute, textcolor=black, text='Bulls\nIn Control')

showBarColors = input(true)
BC_CON = HA_open < HA_close and BUY0 ? green : HA_open < HA_close ? lime : HA_open > HA_close and SEL0? maroon : HA_open > HA_close ? red : gray
barcolor(not showBarColors ? na : BC_CON)

coondawg71 PRO
2 years ago
Nice work as always.
RicardoSantos PRO coondawg71
2 years ago
thx :p
Ideas Scripts Chart
United States
United Kingdom
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 Account and Billing Sign Out