I  have coded a simple long only RSI momentum strategy with a trend filter. The issue that I am facing is that I am getting drastically different backtest results when running the algo on the default 1h resolution bars VS when running the algo on hour bars (generated by consolidating 1m bars). I am concerned that I am consolidating data incorrectly. Can anyone please offer some advice? 

Algo 1 directly below uses the default 1h bars. 

Algo 2 in the attached backtest uses the 1m consolidated into 1h bars.

Algo 1  

from AlgorithmImports import *


 

class DeterminedSkyBlueDinosaur(QCAlgorithm):


 

    def Initialize(self):

        self.SetStartDate(2019, 3, 4)

        self.SetCash(100000)

        self.ticker=self.AddCrypto("ETHUSD", Resolution.Hour)

        self.rsi=self.RSI(self.ticker.Symbol, 14, Resolution.Hour)

        self.TREND=self.SMA(self.ticker.Symbol, 9, Resolution.Daily)

       

        mins_in_day=24

        warmup_days=9

        warmup_time=mins_in_day*warmup_days

        self.SetWarmup(warmup_time)

 


 

        self.prev_rsi_value=None



 

    def OnData(self, data):

 

        if self.IsWarmingUp:

            return

        if not self.ticker.Price > self.TREND.Current.Value:

            return

       

        rsi_value=self.rsi.Current.Value

        trade_quantity=int(self.Portfolio.Cash/self.ticker.Price)*0.9


 

        if self.prev_rsi_value is None:

            self.prev_rsi_value=rsi_value


 

        if not self.Portfolio.Invested:

            if 5<rsi_value<21 and rsi_value>self.prev_rsi_value:

                self.MarketOrder(self.ticker.Symbol, trade_quantity)

                self.StopMarketOrder(self.ticker.Symbol, -trade_quantity,self.ticker.Price*0.8)


 

        if self.Portfolio.Invested:

            if rsi_value>90:

                self.Liquidate()

       

        self.prev_rsi_value=rsi_value

 

 

THANK YOU :)