PureBytes Links
Trading Reference Links
|
it shouldn't be reinitializing it. All ELA's I have will leave var's value
at 1 and work exactly as you want it to...
Deano
-----Original Message-----
From: ja@xxxxxxxxxxxx [mailto:ja@xxxxxxxxxxxx]
Sent: Monday, May 21, 2001 11:04 AM
To: fritz@xxxxxxxx
Cc: Omega-list
Subject: Re: variable
Gary,
At 10:27 AM 5/21/2001 -0600, Gary Fritz wrote:
>Read Bob's reply. EL *already* does what you want. The variable is
>initialized to the value in the "Vars:" statement at the START of the
>chart. Unless you explicitly change the variable with an assignment
>like var1=var1+1, it WILL NOT CHANGE throughout the rest of the chart.
I'm sorry, I think I'm not explaining myself properly and trying everyone's
patience.
Let's say this is my code:
code---------
Vars: var1(0);
if condition then var1=var1+1;
if var1>=2 then begin;
buy, sell, etc;
end;
code---------
Let's say condition was met on the first bar. Now var1 has a value of 1.
Next bar if we meet the condition again, I want Var1 to have a value of 2.
But as the Vars: statement has reinitialized my var1 to 0, the value after
meeting the condition is again 1, not 2, as the previous value of var1 (1)
was reinitialized to (0) .
Am I making sense here at all...?
Regards,
Jerry Arnstein
Access Plus USA Inc.
Tel. (212) 560-5334
Fax (212) 202-3734
ja@xxxxxxxxxxxx
|