Volume Bars
Volume Bars
Volume Bars
// Ver. 1.0.beta.10.08.2015
//
// DISCLAIMER:
//
//
//
// http://karthikmarar.blogspot.mx
//
// WHAT IS THIS?
//
// The following indicators try to acknowledge in a K-I-S-S
//
//
//
//
// 2015
//
//////////////////////////////////////////////////////////////////
vema(array,periods,K) =>
VolW = vol*array
VolK = K/(periods+1)
VMsma = sum((VolW),periods)/sum(vol,periods)
cl = close
op = open
hi = high
lo = low
max(hi-op, cl-lo)),
max(op-cl[1], hi-lo)),
hi-op),
max(op-cl[1], hi-lo)),
hi-lo))))))
hi-lo),
max(op-lo, hi-cl)),
op-lo),
hi-lo))))))
TP = BP+SP
BPV = (BP/TP)*vol
SPV = (SP/TP)*vol
TPV = BPV+SPV
TH = max(high, close[1])
TL = min(low, close[1])
BPP = (TL+close)/2
SPP = (TH+close)/2
VPMavg = (bpMavg+spMavg)/2
// PLOT DIRECTIVES
//Cloud Lines Plot Statements - ***linebr to create rules for change in Shading
p1 = plot(bands and BPplotU ? BPplotU : na, title = 'BP/SP', style=linebr, linewidth=1, color=CondCol)
p2 = plot(bands and SPplotU ? SPplotU : na, title = 'SP/BP', style=linebr, linewidth=1, color=CondCol)
p3 = plot(bands and BPplotD ? BPplotD : na, title = 'BP/SP', style=linebr, linewidth=1, color=CondCol)
p4 = plot(bands and SPplotD ? SPplotD : na, title = 'SP/BP', style=linebr, linewidth=1, color=CondCol)
plot(bands and bpMavg ? bpMavg : na, title = 'BPavg', style=line, linewidth=1, color=green)
plot(bands and spMavg ? spMavg : na, title = 'SPavg', style=line, linewidth=1, color=red)
barcolor(colb?CondCol:na)