def test_anchor_timeframe(): assert utils.anchor_timeframe('1m') == '5m' assert utils.anchor_timeframe('3m') == '15m' assert utils.anchor_timeframe('5m') == '30m' assert utils.anchor_timeframe('15m') == '2h' assert utils.anchor_timeframe('30m') == '3h' assert utils.anchor_timeframe('1h') == '4h' assert utils.anchor_timeframe('2h') == '6h' assert utils.anchor_timeframe('3h') == '1D' assert utils.anchor_timeframe('4h') == '1D' assert utils.anchor_timeframe('6h') == '1D'
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Make sure to read the docs about routes if you haven't already: # https://docs.jesse.trade/docs/routes.html # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # from jesse.utils import anchor_timeframe # trading routes routes = [ ('Binance', 'BTCUSDT', '4h', 'ExampleStrategy'), ] # in case your strategy requires extra candles, timeframes, ... extra_candles = [ ('Binance', 'BTCUSDT', anchor_timeframe('4h')), ]
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Make sure to read the docs about routes if you haven't already: # https://docs.jesse.trade/docs/routes.html # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # from jesse.utils import anchor_timeframe # trading routes routes = [ ('Coinbase', 'BTC-USD', '4h', 'SMACrossover'), ] # in case your strategy requires extra candles, timeframes, ... extra_candles = [ ('Coinbase', 'BTC-USD', anchor_timeframe('4h')), ]