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

Re: EL Problem



PureBytes Links

Trading Reference Links

Dans un courrier daté du 04/03/99 02:06:01 Heure d2iver Pari1 Madrid,
1000mileman@xxxxxxxxxxxxxx a écrit :

> It looks like you got it right, a flipflop mechanism.
>  
>  At 02:25 PM 3/3/99 -0800, you wrote:
>  >Hello Colleagues!
>  >
>  >Could You explain the next EL problem?
>  >
>  >A Very Simple System:
>  >{-------------------}
>  >print("p1 ",TestFunc:2:0);
>  >print("p2 ",TestFunc:2:0);
>  >{-------------------}
>  >
>  >and a Very Simple Function
>  >
>  >{------------------------}
>  >vars: memo(0);
>  >
>  >if currentbar=1 then memo=1
>  >else if memo=1 then memo=0
>  >	else memo=1;
>  >TestFunc=memo;
>  >{------------------------}
>  >
>  >I have in the Print Log:
>  >p1 1
>  >p2 1
>  >p1 0
>  >p2 0
>  >p1 1
>  >p2 1
>  >p1 0
>  >p2 0
>  >...
>  >
>  >

Perfectly normal.
============
Both functions called two times in the print statement produces the same
value!
The internal variables of the user function are not shared externally to their
code, if it was what you expected.

Hope that the trading system that uses this one will make money.

Sincerely,

Pierre Orphelin
www.sirtrade.com