Professional Documents
Culture Documents
Mido
Mido
Mido
//Plots Current Days Open, High, Low, Close, And Or Previous Days. Both Days can be
turned on and off with CheckBox
//Also plots Weekly and Monthly Versions
//Daily Session To be used on IntraDay Charts
study(title="mido", shorttitle="mido", overlay=true)
//Daily
tdo = security(tickerid, 'D', open)
pdo = security(tickerid, 'D', open[1])
pc = security(tickerid, 'D', close)
pdc = security(tickerid, 'D', close[1])
ph = security(tickerid, 'D', high)
pdh = security(tickerid, 'D', high[1])
pl = security(tickerid, 'D', low)
pdl = security(tickerid, 'D', low[1])
a=(pdl+pdh)/2
//Weekly
wtdo = security(tickerid, 'W', open)
wpdo = security(tickerid, 'W', open[1])
wpc = security(tickerid, 'W', close)
wpdc = security(tickerid, 'W', close[1])
wph = security(tickerid, 'W', high)
wpdh = security(tickerid, 'W', high[1])
wpl = security(tickerid, 'W', low)
wpdl = security(tickerid, 'W', low[1])
c=(wpdl+wpdh)/2
//4h
mtdo = security(tickerid, '240', open)
mpdo = security(tickerid, '240', open[1])
mpc = security(tickerid, '240', close)
mpdc = security(tickerid, '240', close[1])
mph = security(tickerid, '240', high)
mpdh = security(tickerid, '240', high[1])
mpl = security(tickerid, '240', low)
mpdl = security(tickerid, '240', low[1])
x=(mpdl+mpdh)/2
//6h
ntdo = security(tickerid, '360', open)
npdo = security(tickerid, '360', open[1])
npc = security(tickerid, '360', close)
npdc = security(tickerid, '360', close[1])
nph = security(tickerid, '360', high)
npdh = security(tickerid, '360', high[1])
npl = security(tickerid, '360', low)
npdl = security(tickerid, '360', low[1])
e=(npdl+npdh)/2
//8h
stdo = security(tickerid, '480', open)
spdo = security(tickerid, '480', open[1])
spc = security(tickerid, '480', close)
spdc = security(tickerid, '480', close[1])
sph = security(tickerid, '480', high)
spdh = security(tickerid, '480', high[1])
spl = security(tickerid, '480', low)
spdl = security(tickerid, '480', low[1])
g=(spdl+spdh)/2
//Daily Plots
offs_daily = 0
//plot(sy and pdo ? pdo : na, title="Previous Days Open", style=cross, linewidth=2,
color=silver)
plot(sy and pdc ? pdc : na, title="Previous Days Close", style=cross, linewidth=2,
color=fuchsia)
plot(sy and pdh ? pdh : na, title="Previous Daily High", style=cross, linewidth=2,
color=lime)
plot(sy and pdl ? pdl : na, title="Previous Daily Low", style=cross, linewidth=2,
color=red)
//Weekly Plots
//4h
//6h
plot(snmh and e ? e : na, title="Mid6", style=circles, linewidth=4, color=silver)
//8h
plot(ssmh and g ? g : na, title="Mid6", style=circles, linewidth=4, color=silver)