Increasing no of executed bars without increasing LookBack

Posted By: ozgur

Increasing no of executed bars without increasing LookBack - 04/17/20 16:05

Hi,

I'd like to run ZigZag indicator on 1H hour bars of past 2 years and collect its turning points in an array for further processing with a dll. ZigZag itself does not require a long LookBack, e.g. 500 is good enough.

As far as I see, I can read price data from AssetX arrays or t6 files with dataset functions then loop through the data but I wonder if there is a more elegant solution.

Thanks a lot.
Posted By: AndrewAMD

Re: Increasing no of executed bars without increasing LookBack - 04/17/20 16:12

I'm not sure what problem you're trying to solve here.
Posted By: ozgur

Re: Increasing no of executed bars without increasing LookBack - 04/17/20 17:55

Hi Andrew,

LookBack is limited to maximum 1 year in Trade Mode according to manual. I'd like to process 2 years of past data.
I am not sure but another issue may be increased memory footprint due to longer LookBack period. I can manage series I create but I don't know what Zorro internally keeps.

So I was wondering if there is a workaround for 1 year limit and meanwhile not wasting memory since I don't really need 2 years of data in series. Maybe there is a function I am missing to tell Zorro start executing from certain past date therefore it can collect data I need (but skip trading logic as obviously it can't trade past)?
Posted By: AndrewAMD

Re: Increasing no of executed bars without increasing LookBack - 04/17/20 18:14

In that case, I believe you can use the PRELOAD flag for live trading.

Emphasis added:
Quote
In [Trade] mode, price history covering the LookBack duration is downloaded from the server immediately before trading starts. Due to weekends and market hours, the lookback duration is normally longer than LookBack * BarPeriod. The downloaded history usually exceeds the lookback duration by a safety margin, but does not exceed 1 year. A longer lookback duration requires the PRELOAD flag and available price history. A too long lookback period will be indicated with a warning message.
https://zorro-project.com/manual/en/lookback.htm
© 2024 lite-C Forums