thx for the code! (especially for the insight to divide timestamp by waitingtime :)) I noticed that the output of ohlcv_candles needs to be flipped (ohlcv_candles.iloc[::-1]) to get the last values with [-1] and [-2] regards