Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
Try this intraday chart indicator from MetaStockTools.com:
[code:1:8a5f3ebe66]
==========
Daily OHLC
==========
---8<---------------------------
{ Daily Open/High/Low/Close v3.0
For intraday charts.
©Copyright 2002~2006 Jose Silva.
The grant of this license is for personal use
only - no resale or repackaging allowed.
All code remains the property of Jose Silva.
http://www.metastocktools.com }
{ User inputs }
pds:=Input("Day's OHLC: [1]Current (dynamic), [2]Previous",1,2,2);
plotOp:=Input("plot daily Open? [1]Yes, [0]No",0,1,1);
plotHi:=Input("plot daily High? [1]Yes, [0]No",0,1,1);
plotLo:=Input("plot daily Low? [1]Yes, [0]No",0,1,1);
{ Day's Start }
SOD:=DayOfMonth()<>Ref(DayOfMonth(),-1)
OR Cum(1)=2;
{ Day's Open }
dOp:=ValueWhen(pds,SOD,O);
dOp:=ValueWhen(1,dOp>0,dOp);
{ Day's High }
Hi:=HighestSince(1,SOD,H);
dHi:=If(pds=1,Hi,ValueWhen(1,SOD,Ref(Hi,-1)));
dHi:=ValueWhen(1,dHi>0,dHi);
{ Day's Low }
Lo:=LowestSince(1,SOD,L);
dLo:=If(pds=1,Lo,ValueWhen(1,SOD,Ref(Lo,-1)));
dLo:=ValueWhen(1,dLo>0,dLo);
{ Day's Close }
dCl:=If(pds=1,C,
ValueWhen(1,SOD,Ref(C,-1))*(Cum(SOD)>1));
dCl:=ValueWhen(1,dCl>0,dCl);
{ Hide OHL price plots }
dOp:=If(plotOp,dOp,dCl);
dHi:=If(plotHi,dHi,dCl);
dLo:=If(plotLo,dLo,dCl);
{ Plot on price chart }
dOp; { <- Open: Violet}
dHi; { <- High: Blue }
dLo; { <- Low: Red }
dCl; { <- Close: Green }
---8<---------------------------
[/code:1:8a5f3ebe66]
jose '-)
|