Hephyrius / binance_futures_bot

A bot that trades leveraged USDT futures markets on binance.
299 stars 123 forks source link

3d time interval issues #37

Open Sanaikimdojin opened 2 years ago

Sanaikimdojin commented 2 years ago

setting.json "trading_periods": "5m,15m", If 3d are included in trading_periods, it will not run. Is it just me?

breadacker commented 2 years ago

class CandlestickInterval: MIN1 = "1m" MIN3 = "3m" MIN5 = "5m" MIN15 = "15m" MIN30 = "30m" HOUR1 = "1h" HOUR2 = "2h" HOUR4 = "4h" HOUR6 = "6h" HOUR8 = "8h" HOUR12 = "12h" DAY1 = "1d" DAY3 = "3d" WEEK1 = "1w" MON1 = "1m" INVALID = None

I did not get such a mistake. Might have made a syntax error maybe?

Sanaikimdojin commented 2 years ago

3d or more included "Encountered Exception operands could not be broadcast together with shapes (499,) (128,)" A phrase appears

breadacker commented 2 years ago

That's because u re trying to merge numpy arrays. Check the params of get_multi_scale and get_signal.

get signal that is confirmed across multiple time scales.

def get_multi_scale_signal(client, _market="BTCUSDT", _periods=["1m"]):

signals = np.zeros(499)
use_last = True

for i, v in enumerate(_periods):

    _signal = get_signal(client, _market, _period= v, use_last=use_last)
    signals = signals + np.array(_signal)
Sanaikimdojin commented 2 years ago

I don't quite understand what you mean :(

Only certain coins have this phenomenon