PureBytes Links
Trading Reference Links
|
Thanks for having a look. It is in 7.2. I finally rewrote as a "While" loop
and that works fine. Very strange. Evey now and then I run across things
like this...the order of things matters when it really shouldn't or similar.
The Bermuda Triangle of TS.
Chris
----- Original Message -----
From: "Bob Fulks" <bfulks@xxxxxxxxxxxx>
To: "Chris Cheatham" <nchrisc@xxxxxxxxxx>; "Omega List"
<omega-list@xxxxxxxxxx>
Sent: Sunday, May 30, 2004 9:53 AM
Subject: Re: el question
> At 12:37 AM 5/30/2004, Chris Cheatham wrote:
> >Indicator does not loop past "0", however if I hard load 1 instead of
> >value1, it works.
>
> It works fine for me In TradeStation 7.2.
>
> The code:
>
> --------------
>
> Vars: jj(0);
>
> value1=1;
> for jj = 0 to value1 begin
> Print(Date:7:0, " L", jj:5:0, Value1:6:0);
> Value1 = Value1 + 1;
> end;
> Print(Date:7:0, " X", jj:5:0, Value1:6:0);
>
> ---------------
>
> Produced the following printout, which is correct:
>
> 1040527 L 0 1
> 1040527 L 1 2
> 1040527 X 2 3
> 1040528 L 0 1
> 1040528 L 1 2
> 1040528 X 2 3
>
> So even if you were changing Value1 inside the loop, it uses the original
> value, which is correct.
>
> Try declaring a variable for Value1 and see if that fixes it.
>
> You did not say which version of TS you were using. TS2000i has a lot of
> mysterious bugs...
>
> Bob Fulks
>
>
>
|