From 2eeaf71c2a3372f1abbff81c1c24994c4ba51b34 Mon Sep 17 00:00:00 2001 From: adonunes Date: Fri, 9 Aug 2024 09:09:53 -0400 Subject: [PATCH] add chanids --- DiscordAlertsTrader/calc_strat.py | 10 +++++----- DiscordAlertsTrader/marketdata/load_chn_hist.py | 6 +++--- DiscordAlertsTrader/server_alert_formatting.py | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/DiscordAlertsTrader/calc_strat.py b/DiscordAlertsTrader/calc_strat.py index 4f65ef7..e32c02d 100644 --- a/DiscordAlertsTrader/calc_strat.py +++ b/DiscordAlertsTrader/calc_strat.py @@ -688,16 +688,16 @@ def grid_search(params_dict, PT=[60], TS=[0], SL=[45], TS_buy=[5,10,15,20,25]): params = { # 'fname_port': '../algoalerter/data\HHscanner_port_delta0.4_179feats_ssnorm_ML_65conf.csv', - 'fname_port': 'data/algoAi_port.csv', - 'trade_type': 'STO', - 'last_days': 100, + 'fname_port': 'data/vader-swings_port.csv', + 'trade_type': 'BTO', + 'last_days': 0, 'filt_date_frm': "", 'filt_date_to': "", 'stc_date':'eod', #'stc alert', #'exp', #,'exp',# , # # 'eod' or 'max_underlying_price': "", # 'min_price': 60, 'max_dte': 4, - 'min_dte': 2, + 'min_dte': 0, 'filt_hour_frm': "", 'filt_hour_to': "", 'include_authors': "", @@ -720,7 +720,7 @@ def grid_search(params_dict, PT=[60], TS=[0], SL=[45], TS_buy=[5,10,15,20,25]): "sell_bto": False, "max_short_val": 4000, "invert_contracts": False, - "do_plot": False + "do_plot": True } import time as tt t0 = tt.time() diff --git a/DiscordAlertsTrader/marketdata/load_chn_hist.py b/DiscordAlertsTrader/marketdata/load_chn_hist.py index d2074b6..42d9cda 100644 --- a/DiscordAlertsTrader/marketdata/load_chn_hist.py +++ b/DiscordAlertsTrader/marketdata/load_chn_hist.py @@ -26,7 +26,7 @@ get_date_after_from_port = True re_download = False delete_port = False -author = "demon" +author = "vader-swings" def get_timestamp(row): @@ -200,7 +200,7 @@ def save_or_append_quote(quotes, symbol, path_quotes, overwrite=False): if order is None or order.get("expDate") is None: continue - order["Trader"] = row["Author"] + order["Trader"] = row["Author"].replace("RedSaberSwings", "lordvader32") dt = datetime.strptime(row["Date"], "%m/%d/%Y %H:%M:%S.%f") # + timedelta(hours=2) order["Date"] = dt.strftime("%Y-%m-%d %H:%M:%S.%f") @@ -223,7 +223,7 @@ def save_or_append_quote(quotes, symbol, path_quotes, overwrite=False): except ValueError: print("Incorrect date format", full_date, dt_fm) continue - tracker.portfolio["isOpen"] = 0 + # tracker.portfolio["isOpen"] = 0 # resp = tracker.trade_alert(order, live_alert=False, channel=author) # continue if datetime.strptime(full_date, dt_fm).date() < dt.date(): diff --git a/DiscordAlertsTrader/server_alert_formatting.py b/DiscordAlertsTrader/server_alert_formatting.py index 6d3b6bb..98dbeb2 100644 --- a/DiscordAlertsTrader/server_alert_formatting.py +++ b/DiscordAlertsTrader/server_alert_formatting.py @@ -47,11 +47,11 @@ def server_formatting(message): message = bishop_formatting(message) elif message.channel.id in [897625103020490773]: message = theta_warrior_elite(message) - elif message.channel.id in [1152082112032292896, 884971446802219048, 1209855531758395423,1210140760800763914 ]: + elif message.channel.id in [1152082112032292896, 884971446802219048, 1209855531758395423,1210140760800763914, 1132823605688938567 ]: message = kingmaker_main_formatting(message) elif message.channel.id in [1139700590339969036, 1184315907376431114, 1183711389777399808]: message = ddking_formatting(message) - elif message.channel.id in [1102753361566122064]: + elif message.channel.id in [1102753361566122064, 977025121292259328]: message = crimson_formatting(message) elif message.channel.id in [1209854873344938044]: message = prophet_formatting(message)