Datafeed as indicator



  • Apologies if this has already been asked, I couldn't find anything similar.

    I am pre-processing the data for my second datafeed, and also using the original unprocessed data as a primary datafeed.

    I am trying to create a strat similar to a SMA crossover strat, using my preprocessed data instead of a rolling mean. In terms of pseudocode it is similar to this -

    when preprocessed data > original data data then self.order = self.buy() ...

    Is it possible to use my secondary datafeed as an indicator, or should I create a dummy indicator to pass values through?


  • administrators

    @rm said in Datafeed as indicator:

    preprocessed data > original data

    That's a standard comparison and will generate a lines object. Same as if you did:

    • data.close - data.high

    It doesn't matter if the operation is boolean or arithmentic.


Log in to reply
 

Looks like your connection to Backtrader Community was lost, please wait while we try to reconnect.