def initialize(state):
state.counter = 0
@schedule(interval="1h",symbol="BTCUSDT")
if state.counter<4:
state.counter += 1
Else:
state.counter = 0
if counter == 4: (every four hours)
macd = data.macd(12,26,9)
signalLine = macd[‘macd_signal’]
- Check if bot has position
has_position = has_open_position(data.symbol, truncated=True)
import numpy as np
def initialize(state):
state.counter = 0
@schedule(interval="1h",...
python error problem
from Programming https://ift.tt/30VWaxo
via IFTTT
0 Comments