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

Resample together: datafeed and strat params whose units are bars

  • Hello community,

    What's the pattern for jointly resampling a datafeed and strat params whose units are bars (e.g. MA period)?

    Example use-case:

    Suppose one has a daily-bar datafeed that's used to run a strategy with a moving average with a period of 30 (MA is a 30-day MA).

    One day, the user decides to try out the same strategy on 3-day bars instead. The datafeed can be resampled or filtered easily to achieve 3-day bars. The MA period should be changed to 10 because a 10-period MA covers the same period as the MA in the previous situation (30 days == 10 periods * 3 days). How should the user go about coding logic that changes the MA period based on the datafeed's resampling?

Log in to reply