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

Re: variable



PureBytes Links

Trading Reference Links

Bob,

At 01:12 PM 5/20/2001 -0400, Bob Fulks wrote:
>At 5:28 PM +0300 5/20/01, ja@xxxxxxxxxxxx wrote:
>
> >Can anyone here tell me how to define a variable which will not get 
> reset to the default value at each bar...? I.e. it should keep it's value 
> until changed by the code when certain if/then conditions are met...
> >
> >Any help much appreciated...
>
>Variables are not set to their default values on each bar. They are 
>initialized to the value specified in the "Vars:" statement and retain 
>that value until reassigned a new value. That new value is retained until 
>again reassigned.

Understood. What I'm trying to avoid is the reinitialization in the "Vars:" 
statement.

I want a variable which I can set at the beginning of a system, and it 
should keep it's value until the code changes it (with a statement like if 
condition then var1=var1+1), however it should not be reinitialized by the 
"Vars:" statement on the next bar, instead it should retain the value 
assigned to it by the code in an earlier bar.

Regards,

Jerry Arnstein
Access Plus USA Inc.
Tel. (212) 560-5334
Fax (212) 202-3734
ja@xxxxxxxxxxxx