OPEN-SOURCE SCRIPT

Reaction

1735
//version=4
study("My Script",overlay=true)
SELL=((2*hlc3-low))
BUY=((2*hlc3-high))
HBOP=((2*hlc3)-(2*low)+high)
LBOP=((2*hlc3)-(2*high)+low)
SELLEMA=ema(SELL,3)
BUYEMA=ema(BUY,3)
HBOPSMA=ema(HBOP,3)
LBOPSMA=ema(LBOP,3)
plot(HBOPSMA[1],color=green)
plot(LBOPSMA[1],color=red)
plot(SELLEMA[1])
plot(BUYEMA[1])
plot(vwap,color=white)
BC= hlc3>BUYEMA and hlc3>hlc3[1] and low>BUYEMA
SC= hlc3<SELLEMA and hlc3<hlc3[1] and high<SELLEMA
DN= not BC and not SC
barcolor(BC? green: na)
barcolor(SC? red: na)
barcolor(DN? yellow: na)

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.