Idx calculated every tick

Posted By: Grat

Idx calculated every tick - 11/13/19 04:30

Hi,

I want to calculate indicator every tick. Know anybody how to?

from manual:
Quote
Data series can not be created in a tick or tock function, and indicators that create data series can not be called; however data series and indicators can be evaluated when they are storing in global variables. Static series can be shifted in a tick or tock function by calling shift, this way allowing tick based indicators or indicators on shorter time frames than BarPeriod.



thanks
Posted By: jcl

Re: Idx calculated every tick - 11/14/19 15:25

Do as the manual says. If you only want to update the recent price, just set the series [0] element in the tick() function. If you really want to shift the whole price series at any tick, use a static series and call shift() in the tick function.
© 2024 lite-C Forums