Problem with the Code

dima777

Member
Messages
85
Likes
1
Hi!
I want to ask if you can help me sort out the following problem. I am trying to verify an indicator code in the easy language editor but the editor fails to uderstand some of the words in it (Indicator: Siligardos Autotrend,TrendlineUp,TrendlineDown). I took the code from the following webpage and it plots automatic trendlines- http://www.traders.com/Documentation/FEEDbk_docs/Archive/112006/TradersTips/TradersTips.html
Here is the code:
Code:
Indicator:  Siligardos Autotrend
inputs:
 Threshold( 30 ),
 Lookback( 300 ) ;
variables:
 TrendLineBuilt( false ),
 PivotsFound( 0 ),
 f( 0 ),
 b( 0 ),
 x( 0 ),
 y( 0 ),
 F1( 0 ),
 F2( 0 ),
 F3( 0 ),
 PF1( 0 ),
 PF2( 0 ),
 PF3( 0 ) ;
arrays:
 PivotArray[500]( 0 ),
 PivotType[4]( 0 ),
 PivotPosition[4]( 0 ),
 SI[500]( 0 ) ;
if LastBarOnChart then
 begin
 for x = 1 to Lookback
  begin
  PivotArray[x] = 0 ;
  end ;
 F1 =  1 ;
 F2 = F1 ;
 PF1 =  Close[F1] ;
 PF2 =  Close[F2] ;
 {find the first move greater than threshold percent}
 while ( 100 *AbsValue( PF1 - PF2 ) / MinList( PF1, PF2 )
  < Threshold and ( F2 < Lookback ) )
  begin
  F2 = F2 + 1 ;
  PF2 =  Close[F2] ;
  end ;
 F3 = F2 ;
 PF3 =  Close[F3] ;
 while F1 < Lookback
  begin
  while ( ( (100 * AbsValue( PF2 - PF3 )
   / MinList( PF2, PF3 ) < Threshold )
   or ( ( ( PF1 < PF2 ) and ( PF2 <= PF3 ) )
   or ( ( PF1>PF2) and ( PF2 >= PF3 ) ) ) )
   and ( F3 < Lookback ) )
   begin
   if ( ( ( PF1 < PF2 ) and ( PF2 <= PF3 ) )
     or ( ( PF1 > PF2 ) and ( PF2 >= PF3 ) ) )
   then
    begin
    F2 = F3 ;
    PF2 =  Close[F2] ;
    end ;
   F3 = F3 + 1 ;
   PF3 =  Close[F3] ;
   end ;
  if ( ( F3 = Lookback ) ) then
   begin
   F1 = F2 ;
   F2 = F3 ;
   PF1 =  Close[F1] ;
   PF2 =  Close[F2] ;
   end ;
  if ( F2 > F1 ) then
   begin
   PivotArray[F2] = 1 ;
   F1 = F2 ;
   F2 = F3 ;
   PF1 =  Close[F1] ;
   PF2 =  Close[F2] ;
   end ;
  end ;
 PivotArray[1] = 0 ;
 PivotArray[Lookback] = 0 ;
 end ;
if LastBarOnChart then
 begin
 x = 1 ;
 y = 1 ;
 while ( y < Lookback )
  begin
  y = y + 1 ;
  if ( ( PivotArray[ y ] <> 0 )
   or ( y = Lookback ) )
  then
   begin
   b = ( Close[y] - Close[x] ) / ( y - x ) ;
   for f = x to y
    begin
    SI[f] =  ( b * ( f - x ) + Close[x] ) ;
    end ;
   x = y ;
   end ;
  end ;
 F = 2 ;
 {locate pivots}
 PivotsFound = 0 ;
 while ( ( F < Lookback - 2 ) and ( PivotsFound < 4 ) )
  begin
  if ( ( SI[f] <= SI[ f + 1 ] )
   and ( SI[ f - 1 ] >= SI[f] ) )
  then
   begin
   PivotsFound = PivotsFound + 1 ;
   PivotType[ 5 - PivotsFound ] =  + 1 ;
   PivotPosition[ 5 - PivotsFound ] =  F ;
   end ;
  if ( ( SI[f] >= SI[ f + 1 ] )
   and (SI[ f - 1 ] <= SI[f] ) )
  then
   begin
   PivotsFound = PivotsFound + 1 ;
   PivotType[ 5 - PivotsFound ] =  - 1 ;
   PivotPosition[ 5 - PivotsFound ] =  f ;
   end ;
  F = F + 1 ;
  end ;
 if ( PivotsFound = 4 ) then
  begin
  if ( PivotType[2] = 1 )
   and ( PivotType[4] = 1 )
   and ( Close[ PivotPosition[2] ]
   < Close[ PivotPosition[4] ] )
   and ( MaxList( Close[ PivotPosition[2] ],
   Close[ PivotPosition[4] ] )
   < MaxList( High[ PivotPosition[4] ],Close[0] ) )
  then
   begin
   Value1 = TrendlineUp( Lookback,
    PivotPosition[2],PivotPosition[4] ) ;
   TrendlineBuilt = true ;
   end
  else if ( PivotType[2] = -1 )
   and ( PivotType[4] = -1 )
   and ( Close[ PivotPosition[2] ]
   > Close[ PivotPosition[4] ] )
   and ( MinList( Close[ PivotPosition[2] ],
   Close[ PivotPosition[4] ] ) > MinList
   ( Close[ PivotPosition[4] ], Close[0] ) )
  then
   begin
   Value1 = TrendlineDown( Lookback,
    PivotPosition[2], PivotPosition[4] );
   TrendlineBuilt = true ;
   end
  else
   Print( " Lookback trendline can be drawn,",
    "Threshold = ", Threshold ) ;
  end ;
 if ( PivotsFound >= 3 ) and TrendLineBuilt = false then
  begin
  if ( PivotType[1] = 1 )
   and ( PivotType[3] = 1 )
   and ( Close[ PivotPosition[1] ] <
   Close[ PivotPosition[3] ] )
   and ( MaxList( Close[ PivotPosition[1] ],
   Close[ PivotPosition[3] ] ) < MaxList(
   Close[ PivotPosition[3] ], Close[0] ) )
  then
   Value1 = TrendlineUp( Lookback,
   PivotPosition[1], PivotPosition[3] )
  else if ( PivotType[1] = -1 )
   and ( PivotType[3] = -1 )
   and ( Close[PivotPosition[1] ] >
   Close[ PivotPosition[3] ] )
   and ( MinList( Close[ PivotPosition[1] ],
   Close[ PivotPosition[3] ] ) > MinList(
   Close[ PivotPosition[3] ], Close[0] ) )
  then
   Value1 = TrendlineDown( Lookback,
   PivotPosition[1], PivotPosition[3] )
  else
   Print( "No trendline can be drawn,",
     "Threshold = ", Threshold ) ;
  end
 else
  Print( "No trendline can be drawn,",
    "Threshold = ", Threshold ) ;
 if ( PivotsFound < 3 ) then
  Print( "No Point Milestones Can Be Found,",
    "Threshold = ", Threshold ) ;
 end ;

Please let me know if it is possibe to correct this problem.
Thanks!!!
Dima
 
What version of Tradestation are you using ?

You can delete the words:
Indicator Siligardos and Autotrend as they are just the title.

I am not sure about why the other two words don't work though.


Paul
 
Hi!
I want to ask if you can help me sort out the following problem. I am trying to verify an indicator code in the easy language editor but the editor fails to uderstand some of the words in it (Indicator: Siligardos Autotrend,TrendlineUp,TrendlineDown). I took the code from the following webpage and it plots automatic trendlines- Traders Tips - November 2006
Here is the code:
Code:
Indicator:  Siligardos Autotrend
inputs:
 Threshold( 30 ),
 Lookback( 300 ) ;
variables:
 TrendLineBuilt( false ),
 PivotsFound( 0 ),
 f( 0 ),
 b( 0 ),
 x( 0 ),
 y( 0 ),
 F1( 0 ),
 F2( 0 ),
 F3( 0 ),
 PF1( 0 ),
 PF2( 0 ),
 PF3( 0 ) ;
arrays:
 PivotArray[500]( 0 ),
 PivotType[4]( 0 ),
 PivotPosition[4]( 0 ),
 SI[500]( 0 ) ;
if LastBarOnChart then
 begin
 for x = 1 to Lookback
  begin
  PivotArray[x] = 0 ;
  end ;
 F1 =  1 ;
 F2 = F1 ;
 PF1 =  Close[F1] ;
 PF2 =  Close[F2] ;
 {find the first move greater than threshold percent}
 while ( 100 *AbsValue( PF1 - PF2 ) / MinList( PF1, PF2 )
  < Threshold and ( F2 < Lookback ) )
  begin
  F2 = F2 + 1 ;
  PF2 =  Close[F2] ;
  end ;
 F3 = F2 ;
 PF3 =  Close[F3] ;
 while F1 < Lookback
  begin
  while ( ( (100 * AbsValue( PF2 - PF3 )
   / MinList( PF2, PF3 ) < Threshold )
   or ( ( ( PF1 < PF2 ) and ( PF2 <= PF3 ) )
   or ( ( PF1>PF2) and ( PF2 >= PF3 ) ) ) )
   and ( F3 < Lookback ) )
   begin
   if ( ( ( PF1 < PF2 ) and ( PF2 <= PF3 ) )
     or ( ( PF1 > PF2 ) and ( PF2 >= PF3 ) ) )
   then
    begin
    F2 = F3 ;
    PF2 =  Close[F2] ;
    end ;
   F3 = F3 + 1 ;
   PF3 =  Close[F3] ;
   end ;
  if ( ( F3 = Lookback ) ) then
   begin
   F1 = F2 ;
   F2 = F3 ;
   PF1 =  Close[F1] ;
   PF2 =  Close[F2] ;
   end ;
  if ( F2 > F1 ) then
   begin
   PivotArray[F2] = 1 ;
   F1 = F2 ;
   F2 = F3 ;
   PF1 =  Close[F1] ;
   PF2 =  Close[F2] ;
   end ;
  end ;
 PivotArray[1] = 0 ;
 PivotArray[Lookback] = 0 ;
 end ;
if LastBarOnChart then
 begin
 x = 1 ;
 y = 1 ;
 while ( y < Lookback )
  begin
  y = y + 1 ;
  if ( ( PivotArray[ y ] <> 0 )
   or ( y = Lookback ) )
  then
   begin
   b = ( Close[y] - Close[x] ) / ( y - x ) ;
   for f = x to y
    begin
    SI[f] =  ( b * ( f - x ) + Close[x] ) ;
    end ;
   x = y ;
   end ;
  end ;
 F = 2 ;
 {locate pivots}
 PivotsFound = 0 ;
 while ( ( F < Lookback - 2 ) and ( PivotsFound < 4 ) )
  begin
  if ( ( SI[f] <= SI[ f + 1 ] )
   and ( SI[ f - 1 ] >= SI[f] ) )
  then
   begin
   PivotsFound = PivotsFound + 1 ;
   PivotType[ 5 - PivotsFound ] =  + 1 ;
   PivotPosition[ 5 - PivotsFound ] =  F ;
   end ;
  if ( ( SI[f] >= SI[ f + 1 ] )
   and (SI[ f - 1 ] <= SI[f] ) )
  then
   begin
   PivotsFound = PivotsFound + 1 ;
   PivotType[ 5 - PivotsFound ] =  - 1 ;
   PivotPosition[ 5 - PivotsFound ] =  f ;
   end ;
  F = F + 1 ;
  end ;
 if ( PivotsFound = 4 ) then
  begin
  if ( PivotType[2] = 1 )
   and ( PivotType[4] = 1 )
   and ( Close[ PivotPosition[2] ]
   < Close[ PivotPosition[4] ] )
   and ( MaxList( Close[ PivotPosition[2] ],
   Close[ PivotPosition[4] ] )
   < MaxList( High[ PivotPosition[4] ],Close[0] ) )
  then
   begin
   Value1 = TrendlineUp( Lookback,
    PivotPosition[2],PivotPosition[4] ) ;
   TrendlineBuilt = true ;
   end
  else if ( PivotType[2] = -1 )
   and ( PivotType[4] = -1 )
   and ( Close[ PivotPosition[2] ]
   > Close[ PivotPosition[4] ] )
   and ( MinList( Close[ PivotPosition[2] ],
   Close[ PivotPosition[4] ] ) > MinList
   ( Close[ PivotPosition[4] ], Close[0] ) )
  then
   begin
   Value1 = TrendlineDown( Lookback,
    PivotPosition[2], PivotPosition[4] );
   TrendlineBuilt = true ;
   end
  else
   Print( " Lookback trendline can be drawn,",
    "Threshold = ", Threshold ) ;
  end ;
 if ( PivotsFound >= 3 ) and TrendLineBuilt = false then
  begin
  if ( PivotType[1] = 1 )
   and ( PivotType[3] = 1 )
   and ( Close[ PivotPosition[1] ] <
   Close[ PivotPosition[3] ] )
   and ( MaxList( Close[ PivotPosition[1] ],
   Close[ PivotPosition[3] ] ) < MaxList(
   Close[ PivotPosition[3] ], Close[0] ) )
  then
   Value1 = TrendlineUp( Lookback,
   PivotPosition[1], PivotPosition[3] )
  else if ( PivotType[1] = -1 )
   and ( PivotType[3] = -1 )
   and ( Close[PivotPosition[1] ] >
   Close[ PivotPosition[3] ] )
   and ( MinList( Close[ PivotPosition[1] ],
   Close[ PivotPosition[3] ] ) > MinList(
   Close[ PivotPosition[3] ], Close[0] ) )
  then
   Value1 = TrendlineDown( Lookback,
   PivotPosition[1], PivotPosition[3] )
  else
   Print( "No trendline can be drawn,",
     "Threshold = ", Threshold ) ;
  end
 else
  Print( "No trendline can be drawn,",
    "Threshold = ", Threshold ) ;
 if ( PivotsFound < 3 ) then
  Print( "No Point Milestones Can Be Found,",
    "Threshold = ", Threshold ) ;
 end ;

Please let me know if it is possibe to correct this problem.
Thanks!!!
Dima

As Paul says, delete the first line.
Also add another end; at the botttom. Verifies ok then in TS2000.

Glenn
 
thanks a lot for your replies...I am using the Omega Research ProSuite 2000i
Version: 5.00.0822
I also added the end to the end of the code and it doesnt help ((((do i simply type in "end" at the end?
BTW, GLEN, are you able to plot those trendlines?
Thanks!!
 
thanks a lot for your replies...I am using the Omega Research ProSuite 2000i
Version: 5.00.0822
I also added the end to the end of the code and it doesnt help ((((do i simply type in "end" at the end?
BTW, GLEN, are you able to plot those trendlines?
Thanks!!

Looks like I didn't copy all the code. Forget what I said. I was in between trades at the time and watching the market waiting for a setup.

Start again.
The code contains Functions called Trendlineup and Trendlinedown and Autotrend as you said.
These are not standard Tradestation functions as far as I know, which suggests that they should be available from wherever you got this code.
When (if) you get the code for them you need to install it in the Editor as 3 separate Functions (rather than Indicators) and verify them. Once they are verified ok, then verify the main Siligardos Autotrend code.

Glenn
 
Looks like I didn't copy all the code. Forget what I said. I was in between trades at the time and watching the market waiting for a setup.

Start again.
The code contains Functions called Trendlineup and Trendlinedown and Autotrend as you said.
These are not standard Tradestation functions as far as I know, which suggests that they should be available from wherever you got this code.
When (if) you get the code for them you need to install it in the Editor as 3 separate Functions (rather than Indicators) and verify them. Once they are verified ok, then verify the main Siligardos Autotrend code.

Glenn

thanks glenn! at least i know now that my power editor is not corrupt..:) i woul look up those functions from the EasyLanguage Library at TradeStation.com but i dont have the access,,,,(( good luck with that setup!
 
if you have any idea exactly what they do then we might be able to reverse engineer them. It appears by the syntax that they are simply defining if a specified trendline is sloping up or down. This would be rather easy to reverse this logic and rebuild the functions.
 
sorry for the outdated response...)) do you think this condition can be coded easily? can it be just that the slope of the trendlines is taken into account?


ps: see yo in the next post))
 
After looking closer at the code, I think you can get the same result by simply loading the Trendlines Automatic indicator provided by TradeStation with the platform.
 
Hello Everyone. This is a little outdated, but I found the code for these functions, except they are not in Easy Language. I found them on this foreign language website, after I translated it to english:

Translated version of http://www.ta-script.com/forum/viewtopic.php?=&p=871

Can anyone covert this to easy language code?

Here is the code from the website for the functions (not in easy language):

TrendLineUp procedure (N, Milestone1, Milestone2: integer);
var
x,x1,x2,f,i : integer; x, x1, x2, f, i: integer;
p1 ,p2 ,b,px : real; p1, p2, b, px: real;
x1OK ,penetration,x2OK : boolean; x1OK, penetration, x2OK: boolean;


begin beginning


x1 := N - Milestone1; x1: = N - Milestone1;
x2 := N - Milestone2; x2: = N - Milestone2;
for i := 0 to barcount -1 do begin for i: = 0 to -1 do begin barcount
//{PART 1: Construction of upward trendline} / / (PART 1: Construction of upward trendline)
if i = barcount -1 then begin if i = barcount -1 then begin
p1 := Close[i - (N - x1) ]; p1: = Close [i - (N - x1)];
p2 := Close[i -(N - x2) ]; p2: = Close [i - (N - x2)];
x := x1 ; x: = x1;
x1OK := false ; x1OK: = false;
while ( ( x1OK = false ) and ( x < x2 ) )do begin while ((x1OK = false) and (x <x2)) do begin
px := Close[i -(N - x) ]; px: = Close [i - (N - x)];
b := ( p2 - px ) / ( x2 - x ); b: = (p2 - px) / (x2 - x);
f := x+1; f: = x +1;
penetration := false; penetration: = false;
while ( ( penetration=false ) and ( f <= x2 ) )do begin while ((penetration = false) and (f <= x2)) do begin

if ( Close[i -(n - f) ]<( b*( f - x )+ Close[i -(N - x) ] ) ) then if (Close [i - (n - f)] <(b * (f - x) + Close [i - (N - x)])) then
penetration := true penetration: = True
else
f := f + 1; f: = f + 1;
end;

if (penetration = false) then begin if (penetration = false) then begin
x1OK := true; x1OK: = true;
x1 := x; X1: = x;
p1 := Close[i -(N - x1) ]; p1: = Close [i - (N - x1)];
end
else
x := x+1; x: = x +1;
end ; end;
if (x1 < x2) and (penetration = false) then begin if (x1 <x2) and (penetration = false) then begin
x := x2; x: = x2;
x2OK := false; x2OK: = false;
while ( ( x2OK = false ) and ( x < N ) )do begin while ((x2OK = false) and (x <N)) do begin
px := Close[i -(N - x) ]; px: = Close [i - (N - x)];
b := ( px - p1 ) / ( x - x1 ); b: = (px - p1) / (x - x1);
f := x1 + 1; f: = x1 + 1;
penetration := false; penetration: = false;
while ( ( penetration = false ) and ( f <= N ) )do begin while ((penetration = false) and (f <= N)) do begin
if ( Close[i - (N - f) ]<( b *( f - x1 ) + Close[i -(N - x1) ] ) ) then if (Close [i - (N - f)] <(b * (f - x1) + Close [i - (N - x1)])) then
penetration := true penetration: = True
else
f := f + 1; f: = f + 1;
end;
if ( penetration = false ) then begin if (penetration = false) then begin
x2OK := true; x2OK: = true;
x2 := x; x2: = x;
end
else
x := x + 1; x: x = + 1;
end;
p1 := Close[i-(N - x1) ]; p1: = Close [i-(N - x1)];
p2 := Close[i -(N - x2) ]; p2: = Close [i - (N - x2)];
b := ( p2 - p1 ) / ( x - x1 ); b: = (p2 - p1) / (x - x1);
if ( ( b > 0 ) and ( penetration = false ) if ((b> 0) and (penetration = false)
and ( x2 < N ) and (x2 <N)
and ( Max( Close[i -(N - x1) ],Close[i -(N - x2) ] )< Max( Close[i -(N - x2) ], Close[i -(N - N) ] ) ) )then begin and (Max (Close [i - (N - x1)], Close [i - (N - x2)]) <Max (Close [i - (N - x2)], Close [i - (N - N)] ))) Then begin

with CreateTrendline(trunc(DateTime[i - (N - x1)]), p1,trunc(DateTime[i - (N - x2)]), p2) do with CreateTrendline (trunc (DateTime [i - (N - x1)]), p1, trunc (DateTime [i - (N - x2)]), p2) do
begin beginning
ExtendLeft := false; ExtendLeft: = false;
ExtendRight := true; ExtendRight: = true;
Width := 2; Width: = 2;
Color := clRed; Color: = clRed;
end;
end;
end;
end;
end;
end;
{*****************************************************************} {************************************************* ****************}
procedure TrendLineDown(N,Milestone1,Milestone2:integer); TrendLineDown procedure (N, Milestone1, Milestone2: integer);
var
x,x1,x2,f,i : integer; x, x1, x2, f, i: integer;
p1 ,p2 ,b,px : real; p1, p2, b, px: real;
x1OK ,penetration,x2OK : boolean; x1OK, penetration, x2OK: boolean;


begin beginning
x1 := N - Milestone1; x1: = N - Milestone1;
x2 := N - Milestone2; x2: = N - Milestone2;
for i := 0 to barcount -1 do begin for i: = 0 to -1 do begin barcount
{PART 1: Construction of upward trendline} (PART 1: Construction of upward trendline)
if i = barcount -1 then begin if i = barcount -1 then begin
p1 := Close[i -(N - x1) ]; p1: = Close [i - (N - x1)];
p2 := Close[i -(N - x2) ]; p2: = Close [i - (N - x2)];
x := x1; x: = x1;
x1OK := false; x1OK: = false;
while ( ( x1OK = false ) and ( x < x2 ) )do begin while ((x1OK = false) and (x <x2)) do begin
px := Close[i -(N - x) ]; px: = Close [i - (N - x)];
b := ( p2 - px ) / ( x2 - x ); b: = (p2 - px) / (x2 - x);
f := x + 1; f: = x + 1;
penetration := false ; penetration: = false;
while ( ( penetration = false ) and ( f <= x2 ) )do begin while ((penetration = false) and (f <= x2)) do begin
if ( Close[i -(n - f) ] > ( b * ( f - x ) + Close[i -(N - x) ] ) ) then if (Close [i - (n - f)]> (b * (f - x) + Close [i - (N - x)])) then
penetration := true penetration: = True
else
f := f + 1 ; f: = f + 1;
end;
if (penetration = false) then begin if (penetration = false) then begin
x1OK := true; x1OK: = true;
x1 := x; X1: = x;
p1 := Close[i -(N - x1) ]; p1: = Close [i - (N - x1)];
end
else
x := x + 1; x: x = + 1;
end;
if ( ( x1 < x2 ) and ( penetration = false ) ) then begin if ((x1 <x2) and (penetration = false)) then begin
x := x2; x: = x2;
x2OK := false; x2OK: = false;
while ( ( x2OK = false ) and ( x < N ) )do begin while ((x2OK = false) and (x <N)) do begin
px := Close[i -(N - x) ]; px: = Close [i - (N - x)];
b := ( px - p1 ) / ( x - x1 ); b: = (px - p1) / (x - x1);
f := x1 + 1; f: = x1 + 1;
penetration := false; penetration: = false;
while ( ( penetration = false ) and ( f <= N ) )do begin while ((penetration = false) and (f <= N)) do begin
if ( Close[ i -(N - f) ] > ( b * ( f - x1 ) + Close[ i -(N - x1) ] ) ) then if (Close [i - (N - f)]> (b * (f - x1) + Close [i - (N - x1)])) then
penetration := true penetration: = True
else
f := f + 1; f: = f + 1;
end;
if (penetration = false) then begin if (penetration = false) then begin
x2OK := true; x2OK: = true;
x2 := x; x2: = x;
end
else
x := x + 1; x: x = + 1;
end;
p1 := Close[ i -(N - x1) ]; p1: = Close [i - (N - x1)];
p2 := Close[ i -(N - x2) ]; p2: = Close [i - (N - x2)];
b := ( p2 - p1 ) / ( x - x1 ); b: = (p2 - p1) / (x - x1);
if ( ( b < 0 ) and ( penetration = false ) if ((b <0) and (penetration = false)
and (x2 < N) and (x2 <N)
and ( Min( Close[ i -(N - x1) ], Close[ i -(N - x2) ] )> Min( Close[i -(N - x2) ], Close[ i -(N - N) ]) ) )then begin and (Min (Close [i - (N - x1)], Close [i - (N - x2)])> Min (Close [i - (N - x2)], Close [i - (N - N)] ))) Then begin

with CreateTrendline(trunc(DateTime[i - (N - x1)]), p1,trunc(DateTime[i - (N - x2)]), p2) do with CreateTrendline (trunc (DateTime [i - (N - x1)]), p1, trunc (DateTime [i - (N - x2)]), p2) do
begin beginning
ExtendLeft := false; ExtendLeft: = false;
ExtendRight := true; ExtendRight: = true;
Width := 2; Width: = 2;
Color := clBlue; Color: = clBlue;
end;
end;
end ; end;
end;
end;
end;

Any takers?

Thanks,

Superdevo
 
Top