This commit is contained in:
aaron 2024-06-08 10:28:51 +08:00
parent 6a7d1253c3
commit 73caaffef8
3 changed files with 18 additions and 23 deletions

View File

@ -13,7 +13,7 @@ times = ["00:00", "04:00", "08:00", "12:00", "16:00", "20:00"]
for t in times: for t in times:
schedule.every().day.at(t).do(vegas.run_crypto, interval = '4h') schedule.every().day.at(t).do(vegas.run_crypto, interval = '4h')
version = 'V1.2' version = 'V1.3'
print(f'Running... {version}') print(f'Running... {version}')
telegram_sender.send_message(setting.chat_id, f'☕️ Strategy is updated\r\n\r\nVersion: {version}') telegram_sender.send_message(setting.chat_id, f'☕️ Strategy is updated\r\n\r\nVersion: {version}')
while True: while True:

View File

@ -6,6 +6,8 @@ import datasource.crypto
import time,setting import time,setting
import telegram_sender import telegram_sender
from datasource import crypto from datasource import crypto
from datetime import datetime
# crossover 函数:检测上穿信号 # crossover 函数:检测上穿信号
def crossover(series1, series2): def crossover(series1, series2):
@ -48,23 +50,21 @@ def stratergy_run(symbol, interval,df):
if latest['longResut']==True: if latest['longResut']==True:
direction = '' direction = ''
message = f"⭐️信号提醒⭐️\r\n\ message = f"⭐️信号提醒⭐️\r\n\r\n"
\r\n\ message += f"策略:【Vegas趋势跟踪V1.0】\r\n"
策略:Vegas趋势跟踪V1.0\r\n\ message += f"品种: {symbol}\r\n"
品种: {symbol}\r\n\ message += f"周期: {interval}\r\n\r\n"
周期: {interval}\r\n\ message += f"信号: 【{direction}\r\n\r\n"
信号: {direction}\r\n\ message += f"当前价格: {round(latest['open'],5)}\r\n"
r\n\ message += f"EMA13: {round(latest['ema13'],5)}\r\n"
当前价格:{latest['open']}\r\n\ message += f"EMA144: {round(latest['ema144'],5)}\r\n"
EMA13:{latest['ema13']}\r\n\ message += f"EMA169: {round(latest['ema169'],5)}\r\n\r\n"
EMA144:{latest['ema144']}\r\n\ message += f"{latest['timestamp'].strftime('%Y/%m/%d %H:%M:%S')}"
EMA169:{latest['ema169']}\r\n\
\r\n\ print(f"{symbol} - {interval}】 is checked!")
{latest['timestamp']}"
print(f"{symbol} - {interval} is checked!")
if direction != "": if direction != "":
telegram_sender.send_message(setting.chat_id, message) telegram_sender.send_message(setting.chat_id, message)
print(f"{symbol} - {interval}】 is singaled!")
def run_crypto(interval): def run_crypto(interval):
print('Vegas策略运行.') print('Vegas策略运行.')

View File

@ -1,13 +1,8 @@
import yfinance as yf import yfinance as yf
import pandas as pd import pandas as pd
import monitors
import monitors.vegas
from datasource import crypto from datasource import crypto
from monitors import large_transfer from monitors import large_transfer
from monitors import vegas
vegas.run_crypto('4h')
# large_transfer.run()
print(crypto.get_top_binance_usdt_pairs(20))