I'm trying to create a strategy which is based on two different timeframes, for example a trading route on '1m' and the extra_candles on '30m'
routes = [('Binance', 'BTCUSDT', '1m', 'some_strategy')]
extra_candles = [('Binance', 'BTCUSDT', '30m')]
I have defined the 30m candle array as following
return self.get_candles(self.exchange, self.symbol, '30m')
def should_long(self) -> bool:
I was expecting that the argument to "some_function" would give the latest 30m candle with its open/low/high/close information, but rather it gives the latest 1m candle information.
If I print:
I get that the size is e.g (241,6) 30 times and then it is increased to (242,6). I understand this as a new 30m candle has been formed after 30 iterations of 1m candle information. Although I don't really know how to only use the latest 30m candle information everytime I call "some_function" and not the latest 1m candle information forming it.