Hi. Can anyone tell how to run a signal based on multiple timeframes . Say if we have 1m data, how to convert it into 5 , 15 , 60 minutes data on Blueshift. Also how can we use signals from higher timeframes to finally confirm it on smaller timeframe.
You can fetch the data at the highest available frequency (1 minute) and then down sample according to your timeframes using pandas resample function. For example for 30 minute candles from 1m data:
px = data.history(symbol('DIVISLAB'),'close',375, '1m')
px = px.resample('30T', label='right').last().dropna()