PureBytes Links
Trading Reference Links
|
On 12 Mar 2002 10:19, I posted the Missing Minutes code below which uses
plotX to show on the chart any missing bars. In testing it in a data2
chart with missing bars in data1, I found it displaced the plots in the
data2 chart until a data1 bar occurred after the missing data2 bars (see
the gif below). This is due to the plotX function plotting only on a
data1 bar.
But the trendline function, TL_New(eDate, eTime, eval, sDate, sTime,
sval), will draw on a data2 bar. The missing bars can be accuartely
located using TL_New(…) (the red dots in the gif) instead of plotX (the
blue dots in the gif) in data2. The number of dots shows the number of
missing bars, but each dot can be a different color if one wants. See
http://www.purebytes.com/archives/omega/2002/msg02697.html for futher
discussion.
if TimeToMinutes(T)>TimeToMinutes(T[1])+1 then
plot1(h+.005*c,"");
if TimeToMinutes(T)>TimeToMinutes(T[1])+2 then plot2(h+.01*c,"");
if TimeToMinutes(T)>TimeToMinutes(T[1])+3 then plot3(h+.015*c,"");
if TimeToMinutes(T)>TimeToMinutes(T[1])+4 then
plot4(h+.02*c,"");
if TimeToMinutes(T)>TimeToMinutes(T[1])+5 then plot1(l-.005*c,"");
if TimeToMinutes(T)>TimeToMinutes(T[1])+6 then plot2(l-.01*c,"");
if TimeToMinutes(T)>TimeToMinutes(T[1])+7 then plot3(l-.015*c,"");
if TimeToMinutes(T)>TimeToMinutes(T[1])+8 then plot4(l-.02*c,"");
I am double posting this on the code-list incase this is too large a
file for the omega-list. I am also going to post a discussion of missing
data1, data2 bars on both lists as the file may be too large for the
omega-list.
var: TL(0);
if TimeToMinutes(Time)>TimeToMinutes(Time[1])+1 then begin
TL=TL_New(Date, Time, .9995*c, Date, Time, c);
TL_SetSize(TL, 3);
TL_SetStyle(TL, 1);
TL_SetColor(TL, 6);
end;
if TimeToMinutes(Time)>TimeToMinutes(Time[1])+2 then begin
TL=TL_New(Date, Time, 1.001*c, Date, Time, 1.0015*c);
TL_SetSize(TL, 3);
TL_SetStyle(TL,1);
TL_SetColor(TL, 6);
end;
if TimeToMinutes(Time)>TimeToMinutes(Time[1])+3 then begin
TL=TL_New(Date, Time, 1.003*c, Date, Time, 1.0035*c);
TL_SetSize(TL, 3);
TL_SetStyle(TL, 1);
TL_SetColor(TL, 6);
end;
if TimeToMinutes(Time)>TimeToMinutes(Time[1])+4 then begin
TL=TL_New(Date, Time, 1.0045*c, Date, Time, 1.005*c);
TL_SetSize(TL, 3);
TL_SetStyle(TL, 1);
TL_SetColor(TL, 6);
end;
if TimeToMinutes(Time)>TimeToMinutes(Time[1])+5 then begin
TL=TL_New(Date, Time, 1.006*c, Date, Time, 1.0065*c);
TL_SetSize(TL, 3);
TL_SetStyle(TL, 1);
TL_SetColor(TL, 6);
end;
if TimeToMinutes(Time)>TimeToMinutes(Time[1])+6 then begin
TL=TL_New(Date, Time, 1.0075*c, Date, Time, 1.008*c);
TL_SetSize(TL, 3);
TL_SetStyle(TL, 1);
TL_SetColor(TL, 6);
end;
if TimeToMinutes(Time)>TimeToMinutes(Time[1])+7 then begin
TL=TL_New(Date, Time, 1.0092*c, Date, Time, 1.0097*c);
TL_SetSize(TL, 3);
TL_SetStyle(TL, 1);
TL_SetColor(TL, 6);
end;
if TimeToMinutes(Time)>TimeToMinutes(Time[1])+8 then begin
TL=TL_New(Date, Time, 1.011*c, Date, Time, 1.0115*c);
TL_SetSize(TL, 3);
TL_SetStyle(TL, 1);
TL_SetColor(TL, 6);
end;
Attachment:
Description: ""
|