Suggestion: make TimeFrame part of STATUS struct

Posted By: Zheka

Suggestion: make TimeFrame part of STATUS struct - 02/26/18 16:55

Testing a portfolio of different algos, one has to set BarPeriod to the lowest common divisor of timeframes used in each strategy and then set TimeFrame in each algo as needed.

However, when looping through algos the 2nd time, frame(0) is not producing the expected result per algo (as TimeFrame reflects just the last setting).

Probably some other fields should be moved/duplicated as well following this logic.
Posted By: Zheka

Re: Suggestion: make TimeFrame part of STATUS struct - 03/03/18 17:26

JCL,

would appreciate your answer.
Posted By: jcl

Re: Suggestion: make TimeFrame part of STATUS struct - 03/05/18 13:17

We appreciate all suggestions, but Timeframe is normally unrelated to algos and must be set by script anyway when calling series and indicators. So it is unlikely that this suggestion will be realized.
Posted By: Zheka

Re: Suggestion: make TimeFrame part of STATUS struct - 03/05/18 16:39

Quote:
Timeframe is normally unrelated to algos
It is normal for components in a portfolio to trade different time frames.
I understand that the current architecture of Zorro requires the use of one common bar period for all the systems in a portfolio, but TimeFrame is set per algo and so can be stored per algo.

Quote:
must be set by script anyway
Yes. But if there is a need to have another loop through the algos(e.g.for money mngt purposes), calculating some meta statistics/performance measures, then for maximum efficiency one would only make calculations on frame-end of each algo. So, TimeFrame calculated and set in each algo function should be visible in an umbrella run() and available for evaluation through the standard frame() function.
And this is impossible now.
© 2024 lite-C Forums