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

Re: Question for Easy Language Expert.



PureBytes Links

Trading Reference Links

At 01:07 PM 05/15/2002, Jerry War wrote:
>I have written some code for an intraday indicator that triggers off time.
>Since I only wanted to execute the code once I added a variable that was set
>true at the start of the day and then set false during the code triggered by
>time. Something like this.
>
>If day<>day[1]  Then
>        TimeFlag=True;
>
>If time>1400 and TimeFlag then
>Begin
>        do this
>        do that
>        TimeFlag=False;
>End;
>
>Except that what I see happening with update every tick is on, Is that the
>variable TimeFlag does not get permanently set False
>until The current bar closes. Such that, the do this do that, happens
>multiple times until the bar closes. I would think that with update every
>tick on the variables should update every tick. Not on the bar close. I have
>confirmed this is what is happening by
>writing the variable to a temp file. Is this correct or am I miss
>understanding something. This is TS6 if that makes a difference.


You're right. You've found exactly how it works, including versions before TS6.

When you update a bar on every tick, all the variables are reinitialized afresh on every update.  They are not remembered from the previous invocation of the same bar.

This would be a case to use some 3rd party global variable DLL.

Mike G.