[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Code Help



PureBytes Links

Trading Reference Links

why not just use the same line and move it. tl_setbegin tl_setend. make a tf
variable called done and say if done = false then tl_new...


----- Original Message ----- 
From: "ericzhou" <ericzh2003@xxxxxxxx>
To: "Harrison" <Harrison@xxxxxxxxxxxxxxxxxxxxxxx>
Cc: "Omega-list" <Omega-List@xxxxxxxxxx>
Sent: Monday, April 04, 2005 2:38 PM
Subject: Re: Code Help


> I'm still struggling with the code.
> What I'm going to do it to plot three mintue high/low on an one mintue
chart
> every three mintues, and delete the previous lines, I was able to code
with
> all history lines shown on chart, just can't figure out how to delete
> history lines.
> BTW, anybody knows how to code high/low of previous trading session's last
> two hours' trading.
> Any help will be appreicated.
>
> Here is my code:
>
> if lastbaronchart then begin
> if DnTLRef >= 0 then TL_Delete(DnTLRef);
> DnTLRef = TL_New(Date, Time, Value1, Date, Time+3, value1);
>    TL_SetColor(DnTLRef,color4);
>       TL_SetSize(DnTLRef,0);
>       TL_SetStyle(DnTLRef,Tool_Dashed);
>       TL_SetExtRight(DnTLRef,false);
>       TL_SetExtLeft(DnTLRef,False);
> end;
>
> Eric
>
>
> ----- Original Message ----- 
> From: "Harrison" <Harrison@xxxxxxxxxxxxxxxxxxxxxxx>
> To: "ericzhou" <ericzh2003@xxxxxxxx>
> Cc: "Omega-list" <Omega-List@xxxxxxxxxx>
> Sent: Wednesday, March 30, 2005 7:19 PM
> Subject: Re: Code Help
>
>
> > Hello Eric,
> >
> > The following few lines, taking from my program, may give you a good
> > start, particularly if you use 3 min charts. This code use the same
> > trendline, but update it with new information.
> >
> > -- Harrison
> > www.HarrisonProgramming.com
> >
> > ----------
> >
> > Vars: TL_ID1(-1), TL_LastUpdateTime(0);
> > Vars: StartDate(0), StartTime(0), StartPrice(0), EndDate(0), EndTime(0),
> > EndPrice(0) ;
> >
> > If (LastBarOnChart and Time <> TL_LastUpdateTime ) then begin
> >
> > { Define StartDate, StartTime, StartPrice, EndDate, EndTime, EndPrice
> here }
> >
> > {Draw two horizontal lines around prior 5 bars, and extend to current
bar}
> > If (TL_ID1 = -1) then begin
> > TL_ID1 = TL_New(StartDate, StartTime, StartPrice, EndDate, EndTime,
> > EndPrice);
> > end
> > else begin
> > Value1 = TL_SetBegin(TL_ID1, StartDate, StartTime, StartPrice);
> > Value2 = TL_SetEnd(TL_ID1, EndDate, EndTime, EndPrice);
> > End;
> > TL_LastUpdateTime = Time;
> >
> > End;
> >
> > ----------
>