For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

long computation times due to low time frame



  • Hello,

    In my strategy I have 1 minute data and same data resampled as 1 Day. I want to test this strategy only on the historical data.

    The strategy looks for a condition being met in 1 Day data first. Only then it needs to access to 1 min data. It takes very long time to run the strategy and I would like to avoid this by only taking 1 minute data into account if condition for 1 Day data is met. That way it will be way faster to crawl through 1 Day historical data rather than 1 minute. Would that ever be possible somehow?


  • administrators

    And how do you keep both streams synchronized? Do you want to look at already gone minutes, at future minutes or at the minute at which the 1-Day stream is being seen (which is the end of the session)?



  • the first question is not clear to me. Firstly the strategy looks at 1-Day data. Only when the condition for 1 Day data holds, the strategy needs to look at lower timeframe data. So basically it should skip all the lower timeframe signals until the condition in high timeframe holds. That would save a ton of computation.


  • administrators

    Your logic in the strategy can look at whatever you want. Please consider the questions again, because you haven't really thought this through

    • How do you keep the synchronization if the smaller timeframe stream is not being processed by the framework?

    When you examine the 1-Day data, you are positioned at the end of the day.

    • Which minute of the 1-minute data stream do you want to examine? At that moment in time the only available minute is the last minute of the day.


  • I think i will approach this problem from another angle.

    I will first run a partial strategy responsible for the high timeframe. Only when I find the necessary conditions i will get the dates and run the full strategy with restricted dates.



  • it turned out partial strategy for high timeframe + low timeframe strategy with restricted datetimes takes longer due to loading the data multiple times. I am still open to suggestions for improvements.