trading-quant/main.py
2023-07-02 22:41:35 +08:00

32 lines
805 B
Python

import schedule
import bn
import setting
import time
import signals.ema_arrangement as maa
import signals.macd as macd
import monitors.large_transfer as lt
symbols = bn.symbols()
for s in symbols:
#15m
schedule.every(15).minutes.do(maa.run, symbol=s, interval='15m')
schedule.every(15).minutes.do(macd.run, symbol=s, interval='15m')
#1h
schedule.every(1).hours.do(maa.run, symbol=s, interval='1h')
schedule.every(1).hours.do(macd.run, symbol=s, interval='1h')
#4h
schedule.every(4).hours.do(maa.run, symbol=s, interval='4h')
schedule.every(4).hours.do(macd.run, symbol=s, interval='4h')
# 监控
schedule.every(setting.whaleAlert_minutes).minutes.do(lt.run)
print(f'Running... ChatID: {setting.chat_id}')
while True:
schedule.run_pending()
time.sleep(1)