OPEN-SOURCE SCRIPT

Reaction

//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)
Trend Analysis

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer