Punk Cloud
Punk Cloud
0
at https://mozilla.org/MPL/2.0/
// © punkchainer
//@version=5
indicator(title="PunkChainer Super EMA", timeframe="", timeframe_gaps=true,
overlay=true)
//----------BOLLINGER BANDS PERCENTAGE OSCILLATOR---------
bblength = 20
bbsrc = close
bbmult = 2
basis = ta.sma(bbsrc, bblength)
dev = bbmult * ta.stdev(bbsrc, bblength)
bbupper = basis + dev
bblower = basis - dev
bbr = (bbsrc - bblower)/(bbupper - bblower)
obValue = 1.1
osValue = -0.1
//---Signals----
exitOversold = ta.crossover(bbr, osValue)
exitOverbought = ta.crossunder(bbr, obValue)
barcolor(exitOverbought ? color.orange : exitOversold ? color.blue : na,
title='candle coloring')
//-----------TREND HEURISTIC-------------------
th_length = input(36, "Ema", group="Trend Heuristic")
//Candle High MA
i_leng = th_length
i_src = high
i_out = ta.ema(i_src, i_leng)
//Candle close MA
x_leng = th_length
x_src = close
x_out = ta.ema(x_src, x_leng)
//Candle Low MA
y_leng = th_length
y_src = low
y_out = ta.ema(y_src, y_leng)
sell = 0.0
buy = 0.0
//alerts
//alerts, retests
alertcondition( ta.crossunder(close, i_out),title='bull retest', message='bullish
retest!')
alertcondition(ta.crossover(close, y_out), title='bear retest', message='bearish
retest!')
//alerts cross
alertcondition(close > i_out and y_out,title='bull cross', message='bullish
trend!')
alertcondition(close > y_out and i_out, title='bear cross', message='bearish
retest!')