TS2000i EL question

rhay999

Junior member
Messages
10
Likes
1
Any help would be much appreciated for the following:

10T chart indicator - Update every tick

Plot1(Average(C,2) ;
Value1 = Value1 + 1 ;
print(Value1) ;

Why can't I get Value1 to increment every tick? It only seems to update at the end of the bar. The print statement and plot update every tick.

I've tried calling a dummy function to increment the counter but that doesn't work either. DLL?

Thanks.
 
Hi there!

The reason why you are getting the behaviour that you are describing is because when Easy Language code is run it loops through the code once for each bar. On the current bar, if "Update every tick" is selected then it runs through the EL code for the current bar each time there is a new update but starts from the last completed bar. In other words it acts as if the the bar has just been completed and it is running through the current bar for the first time.

If you want some persistance of variables for each tick then you would need to use a DLL.

Hope this helps.
 
Thanks for the info. I've now found PUSHPULL.DLL which hopefully should do the trick. But what a pain.....
 
Top