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

Re: el question



PureBytes Links

Trading Reference Links

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