PureBytes Links
Trading Reference Links
|
Hi Howard
First thank you for answering my question, I modified the code to take
into account your
suggestion:
Inputs:Str(5);
Vars:tl(0),switch(0);
Value1=SwingHighBar(1,H, STR,STR+1);
If Value1<>-1 then begin
If switch=0 then begin
Plot1[Value1](H[Value1],"SH");
tl=TL_New(D[Value1], T[Value1], H[Value1], D, T, H[Value1]);
TL_SetExtRight(tl, True);
switch=1;
end else begin
TL_SetEnd(tl, D, T, H[Value1]);
TL_SetBegin(tl, D[Value1],T[Value1], H[Value1]);
Plot1[Value1](H[Value1],"SH");
end;
end;
This code solved the problem with the min charts and after a lot of
tries I tracked down what the problem was with tick charts.
With short tick charts(3-5 ticks) of actively traded securities (ie.
they have a lot of ticks per minute) sometimes can happen that there are
several bars where the Time( Ts can't specify the seconds) is the same
, so for the above TL_SetEnd and TL_SetBegin:
D[Value1]=D
T[Value1]=T
and obviously
H[Value1]=H[Value1]
and this generates an error in EL, that is a trendline can't have the
same beginning and ending point.
The solution , if one want to plot on short tick chart , is to increase
the required strength for the swing point or to start plotting the
trendline from the minute before.
omega-digest-request@xxxxxxxxxx wrote:
> Subject: Re: Trendlines problem
> Date: Fri, 5 May 2000 06:27:42 -0700 (PDT)
> From: Howard Jackson <hrjf4@xxxxxxxxx>
> To: omega list <omega-list@xxxxxxxxxx>
>
> I think the problem is that you might be attempting to
> modify the trendline before its drawn on the chart. If
> the chart has a swing high before bar 10, it will try
> to set the begin and end point of a trendline that is
> not there.
> Try doing this
>
--
Best Regards
Massimo Ciarafoni
"Imagination is more important than knowledge, for knowledge is limited
while imagination
embraces the entire world."- Albert Einstein
|