diff --git a/configuration/crypto_vecm.cfg b/configuration/crypto_vecm.cfg deleted file mode 100644 index fdadd81..0000000 --- a/configuration/crypto_vecm.cfg +++ /dev/null @@ -1,33 +0,0 @@ -{ - "security_type": "CRYPTO", - "data_directory": "./data/crypto", - "datafiles": [ - "2025*.mktdata.ohlcv.db" - ], - "db_table_name": "md_1min_bars", - "exchange_id": "BNBSPOT", - "instrument_id_pfx": "PAIR-", - "funding_per_pair": 2000.0, - - # ====== Trading Parameters ====== - "price_column": "close", - "dis-equilibrium_open_trshld": 2.0, - "dis-equilibrium_close_trshld": 1.0, - "training_minutes": 120, - "fit_method_class": "pt_trading.vecm_rolling_fit.VECMRollingFit", - - # ====== Stop Conditions ====== - "stop_close_conditions": { - "profit": 2.0, - "loss": -0.5 - } - - # ====== End of Session Closeout ====== - "close_outstanding_positions": true, - # "close_outstanding_positions": false, - "trading_hours": { - "begin_session": "9:30:00", - "end_session": "21:30:00", - "timezone": "America/New_York" - } -} \ No newline at end of file diff --git a/configuration/crypto_zscore.cfg b/configuration/crypto_zscore.cfg deleted file mode 100644 index 95b0add..0000000 --- a/configuration/crypto_zscore.cfg +++ /dev/null @@ -1,33 +0,0 @@ -{ - "security_type": "CRYPTO", - "data_directory": "./data/crypto", - "datafiles": [ - "20250602.mktdata.ohlcv.db" - ], - "db_table_name": "md_1min_bars", - "exchange_id": "BNBSPOT", - "instrument_id_pfx": "PAIR-", - "funding_per_pair": 2000.0, - - # ====== Trading Parameters ====== - "price_column": "close", - "dis-equilibrium_open_trshld": 2.0, - "dis-equilibrium_close_trshld": 0.5, - "training_minutes": 120, - "fit_method_class": "pt_trading.z-score_rolling_fit.ZScoreRollingFit", - - # ====== Stop Conditions ====== - "stop_close_conditions": { - "profit": 2.0, - "loss": -0.5 - } - - # ====== End of Session Closeout ====== - "close_outstanding_positions": true, - # "close_outstanding_positions": false, - "trading_hours": { - "begin_session": "9:30:00", - "end_session": "22:30:00", - "timezone": "America/New_York" - } -} \ No newline at end of file diff --git a/configuration/equity_vecm.cfg b/configuration/equity_vecm.cfg deleted file mode 100644 index 7f4ac03..0000000 --- a/configuration/equity_vecm.cfg +++ /dev/null @@ -1,35 +0,0 @@ -{ - "security_type": "EQUITY", - "data_directory": "./data/equity", - "datafiles": [ - "202506*.mktdata.ohlcv.db", - ], - "db_table_name": "md_1min_bars", - "exchange_id": "ALPACA", - "instrument_id_pfx": "STOCK-", - "exclude_instruments": ["CAN"], - - "funding_per_pair": 2000.0, - - # ====== Trading Parameters ====== - "price_column": "close", - "dis-equilibrium_open_trshld": 2.0, - "dis-equilibrium_close_trshld": 1.0, - "training_minutes": 120, - "fit_method_class": "pt_trading.vecm_rolling_fit.VECMRollingFit", - - # ====== Stop Conditions ====== - "stop_close_conditions": { - "profit": 2.0, - "loss": -0.5 - } - - # ====== End of Session Closeout ====== - "close_outstanding_positions": true, - # "close_outstanding_positions": false, - "trading_hours": { - "begin_session": "9:30:00", - "end_session": "15:30:00", - "timezone": "America/New_York" - } -} \ No newline at end of file diff --git a/configuration/equity_zscore.cfg b/configuration/equity_zscore.cfg deleted file mode 100644 index fc5c71c..0000000 --- a/configuration/equity_zscore.cfg +++ /dev/null @@ -1,35 +0,0 @@ -{ - "security_type": "EQUITY", - "data_directory": "./data/equity", - "datafiles": [ - "202506*.mktdata.ohlcv.db", - ], - "db_table_name": "md_1min_bars", - "exchange_id": "ALPACA", - "instrument_id_pfx": "STOCK-", - "exclude_instruments": ["CAN"], - - "funding_per_pair": 2000.0, - - # ====== Trading Parameters ====== - "price_column": "close", - "dis-equilibrium_open_trshld": 2.0, - "dis-equilibrium_close_trshld": 1.0, - "training_minutes": 120, - "fit_method_class": "pt_trading.z-score_rolling_fit.ZScoreRollingFit", - - # ====== Stop Conditions ====== - "stop_close_conditions": { - "profit": 2.0, - "loss": -0.5 - } - - # ====== End of Session Closeout ====== - "close_outstanding_positions": true, - # "close_outstanding_positions": false, - "trading_hours": { - "begin_session": "9:30:00", - "end_session": "15:30:00", - "timezone": "America/New_York" - } -} \ No newline at end of file diff --git a/configuration/z-score-intermarket.cfg b/configuration/z-score-intermarket.cfg deleted file mode 100644 index 173e6e8..0000000 --- a/configuration/z-score-intermarket.cfg +++ /dev/null @@ -1,38 +0,0 @@ -{ - "market_data_loading": { - "CRYPTO": { - "data_directory": "./data/crypto", - "db_table_name": "md_1min_bars", - "instrument_id_pfx": "PAIR-", - }, - "EQUITY": { - "data_directory": "./data/equity", - "db_table_name": "md_1min_bars", - "instrument_id_pfx": "STOCK-", - } - }, - - # ====== Funding ====== - "funding_per_pair": 2000.0, - # ====== Trading Parameters ====== - "price_column": "close", - "dis-equilibrium_open_trshld": 2.0, - "dis-equilibrium_close_trshld": 0.5, - "training_minutes": 120, - "fit_method_class": "pt_trading.z-score_rolling_fit.ZScoreRollingFit", - - # ====== Stop Conditions ====== - "stop_close_conditions": { - "profit": 2.0, - "loss": -0.5 - } - - # ====== End of Session Closeout ====== - "close_outstanding_positions": true, - # "close_outstanding_positions": false, - "trading_hours": { - "timezone": "America/New_York", - "begin_session": "9:30:00", - "end_session": "15:30:00", - } -} \ No newline at end of file diff --git a/research/notebooks/single_pair_test.ipynb b/research/notebooks/single_pair_test.ipynb index 779e201..035b05d 100644 --- a/research/notebooks/single_pair_test.ipynb +++ b/research/notebooks/single_pair_test.ipynb @@ -14,7 +14,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 203, "metadata": {}, "outputs": [], "source": [ @@ -43,7 +43,7 @@ "CONFIG_FILE = f\"{ROOT_DIR}/configuration/zscore.cfg\"\n", "\n", "# Date for data file selection (format: YYYYMMDD)\n", - "TRADING_DATE = \"20250601\" # Change this to your desired date\n", + "TRADING_DATE = \"20250602\" # Change this to your desired date\n", "\n", "# ================================ E Q U I T Y ================================\n", "INSTRUMENTS = {\n", @@ -121,7 +121,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 204, "metadata": {}, "outputs": [], "source": [ @@ -165,7 +165,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 205, "metadata": {}, "outputs": [], "source": [ @@ -246,7 +246,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 206, "metadata": {}, "outputs": [], "source": [ @@ -324,7 +324,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 207, "metadata": {}, "outputs": [ { @@ -337,7 +337,7 @@ " Configuration: /home/oleg/develop/pairs_trading/configuration/zscore.cfg\n", " Symbol A: COIN\n", " Symbol B: BTC-USDT\n", - " Trading Date: 2025-06-01\n", + " Trading Date: 2025-06-02\n", "\n", "Loading /home/oleg/develop/pairs_trading/configuration/zscore.cfg configuration using HJSON...\n", "✓ Successfully loaded configuration\n", @@ -349,21 +349,162 @@ " Fit Method: ZScoreRollingFit\n", "\n", "Data Configuration:\n", - " Data File: 20250601.mktdata.ohlcv.db\n", - " ✓ Data file found: ./data/crypto/20250601.mktdata.ohlcv.db\n" + " Data File: 20250602.mktdata.ohlcv.db\n", + " ✓ Data file found: ./data/crypto/20250602.mktdata.ohlcv.db\n", + " ✓ Data file found: ./data/equity/20250602.mktdata.ohlcv.db\n", + "\n", + "Created trading pair: COIN & BTC-USDT\n", + "Market data shape: (455, 3)\n", + "Column names: ['close_COIN', 'close_BTC-USDT']\n", + "\n", + "Sample data:\n" ] }, { - "ename": "FileNotFoundError", - "evalue": " ⚠ Data file not found: ./data/equity/20250601.mktdata.ohlcv.db\n Please check if the date and file exist in the data directory", - "output_type": "error", - "traceback": [ - "\u001b[31m---------------------------------------------------------------------------\u001b[39m", - "\u001b[31mFileNotFoundError\u001b[39m Traceback (most recent call last)", - "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[22]\u001b[39m\u001b[32m, line 40\u001b[39m\n\u001b[32m 38\u001b[39m setup()\n\u001b[32m 39\u001b[39m load_config_from_file()\n\u001b[32m---> \u001b[39m\u001b[32m40\u001b[39m \u001b[43mprint_config\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 41\u001b[39m prepare_market_data()\n", - "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[21]\u001b[39m\u001b[32m, line 52\u001b[39m, in \u001b[36mprint_config\u001b[39m\u001b[34m()\u001b[39m\n\u001b[32m 50\u001b[39m \u001b[38;5;28mprint\u001b[39m(\u001b[33mf\u001b[39m\u001b[33m\"\u001b[39m\u001b[33m ✓ Data file found: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mdata_file_path\u001b[38;5;132;01m}\u001b[39;00m\u001b[33m\"\u001b[39m)\n\u001b[32m 51\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m---> \u001b[39m\u001b[32m52\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mFileNotFoundError\u001b[39;00m(\n\u001b[32m 53\u001b[39m \u001b[33mf\u001b[39m\u001b[33m\"\u001b[39m\u001b[33m ⚠ Data file not found: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mdata_file_path\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[33m\"\u001b[39m\n\u001b[32m 54\u001b[39m \u001b[33mf\u001b[39m\u001b[33m\"\u001b[39m\u001b[33m Please check if the date and file exist in the data directory\u001b[39m\u001b[33m\"\u001b[39m\n\u001b[32m 55\u001b[39m )\n\u001b[32m 57\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m 58\u001b[39m \u001b[38;5;28mprint\u001b[39m(\u001b[33m\"\u001b[39m\u001b[33m⚠ Failed to load configuration. Please check the configuration file.\u001b[39m\u001b[33m\"\u001b[39m)\n", - "\u001b[31mFileNotFoundError\u001b[39m: ⚠ Data file not found: ./data/equity/20250601.mktdata.ohlcv.db\n Please check if the date and file exist in the data directory" - ] + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
tstampclose_COINclose_BTC-USDT
1362025-06-02 13:30:00246.9800104007.14
1372025-06-02 13:31:00247.0750104012.63
1382025-06-02 13:32:00247.6988104137.37
1392025-06-02 13:33:00247.6000104275.95
1402025-06-02 13:34:00247.2500104275.44
\n", + "
" + ], + "text/plain": [ + " tstamp close_COIN close_BTC-USDT\n", + "136 2025-06-02 13:30:00 246.9800 104007.14\n", + "137 2025-06-02 13:31:00 247.0750 104012.63\n", + "138 2025-06-02 13:32:00 247.6988 104137.37\n", + "139 2025-06-02 13:33:00 247.6000 104275.95\n", + "140 2025-06-02 13:34:00 247.2500 104275.44" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
tstampclose_COINclose_BTC-USDT
3252025-06-02 22:25:00248.5000105701.93
3262025-06-02 22:26:00248.3300105776.48
3272025-06-02 22:27:00248.6672105752.91
3282025-06-02 22:28:00248.3500105764.15
3292025-06-02 22:29:00248.2500105750.52
\n", + "
" + ], + "text/plain": [ + " tstamp close_COIN close_BTC-USDT\n", + "325 2025-06-02 22:25:00 248.5000 105701.93\n", + "326 2025-06-02 22:26:00 248.3300 105776.48\n", + "327 2025-06-02 22:27:00 248.6672 105752.91\n", + "328 2025-06-02 22:28:00 248.3500 105764.15\n", + "329 2025-06-02 22:29:00 248.2500 105750.52" + ] + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ @@ -424,7 +565,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 208, "metadata": {}, "outputs": [], "source": [ @@ -469,7 +610,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 209, "metadata": {}, "outputs": [], "source": [ @@ -561,7 +702,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 210, "metadata": {}, "outputs": [], "source": [ @@ -632,7 +773,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 211, "metadata": {}, "outputs": [], "source": [ @@ -815,10 +956,11 @@ " for _, trade in pair_trades.iterrows():\n", " symbol = trade['symbol']\n", " side = trade['side']\n", - " status = trade['status']\n", + " # status = trade['status']\n", + " action = trade['action']\n", " \n", " # Create signal group key (without status to combine OPEN/CLOSE)\n", - " signal_key = f\"{symbol} {side}\"\n", + " signal_key = f\"{symbol} {side} {action}\"\n", " \n", " # Find normalized price for this trade\n", " trade_time = trade['time']\n", @@ -843,7 +985,8 @@ " 'actual_prices': [],\n", " 'symbol': symbol,\n", " 'side': side,\n", - " 'status': status\n", + " # 'status': status,\n", + " 'action': trade['action']\n", " }\n", " \n", " # Add to group\n", @@ -855,9 +998,11 @@ " for signal_key, group_data in signal_groups.items():\n", " symbol = group_data['symbol']\n", " side = group_data['side']\n", - " status = group_data['status']\n", + " # status = group_data['status']\n", " \n", " # Determine marker properties (same for all OPEN/CLOSE of same side)\n", + " is_close: bool = (group_data['action'] == \"CLOSE\")\n", + " \n", " if 'BUY' in side:\n", " marker_color = 'green'\n", " marker_symbol = 'triangle-up'\n", @@ -877,8 +1022,8 @@ " (pair_trades['symbol'] == symbol) & \n", " (pair_trades['side'] == side)]\n", " if len(trade_info) > 0:\n", - " trade_status = trade_info.iloc[0]['status']\n", - " hover_texts.append(f'{signal_key} {trade_status}
' +\n", + " action = trade_info.iloc[0]['action']\n", + " hover_texts.append(f'{signal_key} {action}
' +\n", " f'Time: {time}
' +\n", " f'Normalized Price: {norm_price:.4f}
' +\n", " f'Actual Price: ${actual_price:.2f}')\n", @@ -898,7 +1043,7 @@ " color=marker_color,\n", " size=marker_size,\n", " symbol=marker_symbol,\n", - " # line=dict(width=2, color='black')\n", + " line=dict(width=2, color='black') if is_close else None\n", " ),\n", " showlegend=True,\n", " hovertemplate='%{text}',\n", @@ -908,7 +1053,6 @@ " )\n", "\n", " # ----------------------------- \n", - " # 2. Trading signals timeline if available - using consistent timeline\n", " \n", " fig.add_trace(\n", " go.Scatter(\n", @@ -959,7 +1103,8 @@ " y=buy_close_trades['price'],\n", " mode='markers',\n", " name=f'{SYMBOL_A} BUY CLOSE',\n", - " marker=dict(color='green', size=12, symbol='square'),\n", + " marker=dict(color='green', size=12, symbol='triangle-up'),\n", + " line=dict(width=2, color='black'),\n", " showlegend=True\n", " ),\n", " row=3, col=1\n", @@ -987,7 +1132,8 @@ " y=sell_close_trades['price'],\n", " mode='markers',\n", " name=f'{SYMBOL_A} SELL CLOSE',\n", - " marker=dict(color='red', size=12, symbol='square'),\n", + " marker=dict(color='red', size=12, symbol='triangle-down'),\n", + " line=dict(width=2, color='black'),\n", " showlegend=True\n", " ),\n", " row=3, col=1\n", @@ -1043,7 +1189,8 @@ " y=buy_close_trades['price'],\n", " mode='markers',\n", " name=f'{SYMBOL_B} BUY CLOSE',\n", - " marker=dict(color='green', size=12, symbol='square'),\n", + " marker=dict(color='green', size=12, symbol='triangle-up'),\n", + " line=dict(width=2, color='black'),\n", " showlegend=True\n", " ),\n", " row=4, col=1\n", @@ -1071,7 +1218,8 @@ " y=sell_close_trades['price'],\n", " mode='markers',\n", " name=f'{SYMBOL_B} SELL CLOSE',\n", - " marker=dict(color='red', size=12, symbol='square'),\n", + " marker=dict(color='red', size=12, symbol='triangle-down'),\n", + " line=dict(width=2, color='black'),\n", " showlegend=True\n", " ),\n", " row=4, col=1\n", @@ -1136,7 +1284,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 212, "metadata": {}, "outputs": [], "source": [ @@ -1206,7 +1354,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 213, "metadata": {}, "outputs": [], "source": [ @@ -1287,7 +1435,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 214, "metadata": {}, "outputs": [ { @@ -3778,28 +3926,22 @@ "symbol": "triangle-down" }, "mode": "markers", - "name": "COIN SELL", + "name": "COIN SELL OPEN", "showlegend": true, "text": [ - "COIN SELL OPEN
Time: 2025-06-02 15:31:00
Normalized Price: 0.9945
Actual Price: $245.62", - "COIN SELL CLOSE
Time: 2025-06-02 17:42:00
Normalized Price: 0.9941
Actual Price: $245.52", - "COIN SELL CLOSE
Time: 2025-06-02 18:01:00
Normalized Price: 0.9953
Actual Price: $245.81", - "COIN SELL OPEN
Time: 2025-06-02 18:09:00
Normalized Price: 0.9938
Actual Price: $245.45", - "COIN SELL OPEN
Time: 2025-06-02 18:57:00
Normalized Price: 0.9912
Actual Price: $244.81" + "COIN SELL OPEN OPEN
Time: 2025-06-02 15:31:00
Normalized Price: 0.9945
Actual Price: $245.62", + "COIN SELL OPEN OPEN
Time: 2025-06-02 18:09:00
Normalized Price: 0.9938
Actual Price: $245.45", + "COIN SELL OPEN OPEN
Time: 2025-06-02 18:57:00
Normalized Price: 0.9912
Actual Price: $244.81" ], "type": "scatter", "x": [ "2025-06-02T15:31:00", - "2025-06-02T17:42:00", - "2025-06-02T18:01:00", "2025-06-02T18:09:00", "2025-06-02T18:57:00" ], "xaxis": "x2", "y": [ 0.9944934812535429, - 0.9940744189812941, - 0.9952627743137097, 0.9938051664102356, 0.9912142683618107 ], @@ -3813,33 +3955,93 @@ "symbol": "triangle-up" }, "mode": "markers", - "name": "BTC-USDT BUY", + "name": "BTC-USDT BUY OPEN", "showlegend": true, "text": [ - "BTC-USDT BUY OPEN
Time: 2025-06-02 15:31:00
Normalized Price: 1.0032
Actual Price: $104335.80", - "BTC-USDT BUY CLOSE
Time: 2025-06-02 17:42:00
Normalized Price: 1.0019
Actual Price: $104206.17", - "BTC-USDT BUY CLOSE
Time: 2025-06-02 18:01:00
Normalized Price: 1.0042
Actual Price: $104443.40", - "BTC-USDT BUY OPEN
Time: 2025-06-02 18:09:00
Normalized Price: 1.0039
Actual Price: $104414.61", - "BTC-USDT BUY OPEN
Time: 2025-06-02 18:57:00
Normalized Price: 1.0029
Actual Price: $104305.86" + "BTC-USDT BUY OPEN OPEN
Time: 2025-06-02 15:31:00
Normalized Price: 1.0032
Actual Price: $104335.80", + "BTC-USDT BUY OPEN OPEN
Time: 2025-06-02 18:09:00
Normalized Price: 1.0039
Actual Price: $104414.61", + "BTC-USDT BUY OPEN OPEN
Time: 2025-06-02 18:57:00
Normalized Price: 1.0029
Actual Price: $104305.86" ], "type": "scatter", "x": [ "2025-06-02T15:31:00", - "2025-06-02T17:42:00", - "2025-06-02T18:01:00", "2025-06-02T18:09:00", "2025-06-02T18:57:00" ], "xaxis": "x2", "y": [ 1.0031599753632299, - 1.0019136186227215, - 1.004194519722396, 1.0039177118032474, 1.0028721105108747 ], "yaxis": "y2" }, + { + "hovertemplate": "%{text}", + "marker": { + "color": "green", + "line": { + "color": "black", + "width": 2 + }, + "size": 14, + "symbol": "triangle-up" + }, + "mode": "markers", + "name": "COIN BUY CLOSE", + "showlegend": true, + "text": [ + "COIN BUY CLOSE CLOSE
Time: 2025-06-02 15:47:00
Normalized Price: 0.9974
Actual Price: $246.35", + "COIN BUY CLOSE CLOSE
Time: 2025-06-02 18:24:00
Normalized Price: 0.9944
Actual Price: $245.60", + "COIN BUY CLOSE CLOSE
Time: 2025-06-02 19:59:00
Normalized Price: 0.9991
Actual Price: $246.76" + ], + "type": "scatter", + "x": [ + "2025-06-02T15:47:00", + "2025-06-02T18:24:00", + "2025-06-02T19:59:00" + ], + "xaxis": "x2", + "y": [ + 0.9974491861689205, + 0.9944327475908981, + 0.9991092396145437 + ], + "yaxis": "y2" + }, + { + "hovertemplate": "%{text}", + "marker": { + "color": "red", + "line": { + "color": "black", + "width": 2 + }, + "size": 14, + "symbol": "triangle-down" + }, + "mode": "markers", + "name": "BTC-USDT SELL CLOSE", + "showlegend": true, + "text": [ + "BTC-USDT SELL CLOSE CLOSE
Time: 2025-06-02 15:47:00
Normalized Price: 1.0034
Actual Price: $104360.01", + "BTC-USDT SELL CLOSE CLOSE
Time: 2025-06-02 18:24:00
Normalized Price: 1.0058
Actual Price: $104606.50", + "BTC-USDT SELL CLOSE CLOSE
Time: 2025-06-02 19:59:00
Normalized Price: 1.0040
Actual Price: $104425.63" + ], + "type": "scatter", + "x": [ + "2025-06-02T15:47:00", + "2025-06-02T18:24:00", + "2025-06-02T19:59:00" + ], + "xaxis": "x2", + "y": [ + 1.0033927478440423, + 1.005762681292842, + 1.0040236660675412 + ], + "yaxis": "y2" + }, { "hovertemplate": "%{text}", "marker": { @@ -3848,30 +4050,21 @@ "symbol": "triangle-up" }, "mode": "markers", - "name": "COIN BUY", + "name": "COIN BUY OPEN", "showlegend": true, "text": [ - "COIN BUY CLOSE
Time: 2025-06-02 15:47:00
Normalized Price: 0.9974
Actual Price: $246.35", - "COIN BUY OPEN
Time: 2025-06-02 16:28:00
Normalized Price: 0.9958
Actual Price: $245.94", - "COIN BUY OPEN
Time: 2025-06-02 17:57:00
Normalized Price: 0.9957
Actual Price: $245.93", - "COIN BUY CLOSE
Time: 2025-06-02 18:24:00
Normalized Price: 0.9944
Actual Price: $245.60", - "COIN BUY CLOSE_STOP_LOSS
Time: 2025-06-02 19:59:00
Normalized Price: 0.9991
Actual Price: $246.76" + "COIN BUY OPEN OPEN
Time: 2025-06-02 16:28:00
Normalized Price: 0.9958
Actual Price: $245.94", + "COIN BUY OPEN OPEN
Time: 2025-06-02 17:57:00
Normalized Price: 0.9957
Actual Price: $245.93" ], "type": "scatter", "x": [ - "2025-06-02T15:47:00", "2025-06-02T16:28:00", - "2025-06-02T17:57:00", - "2025-06-02T18:24:00", - "2025-06-02T19:59:00" + "2025-06-02T17:57:00" ], "xaxis": "x2", "y": [ - 0.9974491861689205, 0.9958093772775124, - 0.9957283990606528, - 0.9944327475908981, - 0.9991092396145437 + 0.9957283990606528 ], "yaxis": "y2" }, @@ -3883,30 +4076,81 @@ "symbol": "triangle-down" }, "mode": "markers", - "name": "BTC-USDT SELL", + "name": "BTC-USDT SELL OPEN", "showlegend": true, "text": [ - "BTC-USDT SELL CLOSE
Time: 2025-06-02 15:47:00
Normalized Price: 1.0034
Actual Price: $104360.01", - "BTC-USDT SELL OPEN
Time: 2025-06-02 16:28:00
Normalized Price: 1.0009
Actual Price: $104104.02", - "BTC-USDT SELL OPEN
Time: 2025-06-02 17:57:00
Normalized Price: 1.0041
Actual Price: $104428.57", - "BTC-USDT SELL CLOSE
Time: 2025-06-02 18:24:00
Normalized Price: 1.0058
Actual Price: $104606.50", - "BTC-USDT SELL CLOSE_STOP_LOSS
Time: 2025-06-02 19:59:00
Normalized Price: 1.0040
Actual Price: $104425.63" + "BTC-USDT SELL OPEN OPEN
Time: 2025-06-02 16:28:00
Normalized Price: 1.0009
Actual Price: $104104.02", + "BTC-USDT SELL OPEN OPEN
Time: 2025-06-02 17:57:00
Normalized Price: 1.0041
Actual Price: $104428.57" ], "type": "scatter", "x": [ - "2025-06-02T15:47:00", "2025-06-02T16:28:00", - "2025-06-02T17:57:00", - "2025-06-02T18:24:00", - "2025-06-02T19:59:00" + "2025-06-02T17:57:00" ], "xaxis": "x2", "y": [ - 1.0033927478440423, 1.0009314745122306, - 1.0040519333576523, - 1.005762681292842, - 1.0040236660675412 + 1.0040519333576523 + ], + "yaxis": "y2" + }, + { + "hovertemplate": "%{text}", + "marker": { + "color": "red", + "line": { + "color": "black", + "width": 2 + }, + "size": 14, + "symbol": "triangle-down" + }, + "mode": "markers", + "name": "COIN SELL CLOSE", + "showlegend": true, + "text": [ + "COIN SELL CLOSE CLOSE
Time: 2025-06-02 17:42:00
Normalized Price: 0.9941
Actual Price: $245.52", + "COIN SELL CLOSE CLOSE
Time: 2025-06-02 18:01:00
Normalized Price: 0.9953
Actual Price: $245.81" + ], + "type": "scatter", + "x": [ + "2025-06-02T17:42:00", + "2025-06-02T18:01:00" + ], + "xaxis": "x2", + "y": [ + 0.9940744189812941, + 0.9952627743137097 + ], + "yaxis": "y2" + }, + { + "hovertemplate": "%{text}", + "marker": { + "color": "green", + "line": { + "color": "black", + "width": 2 + }, + "size": 14, + "symbol": "triangle-up" + }, + "mode": "markers", + "name": "BTC-USDT BUY CLOSE", + "showlegend": true, + "text": [ + "BTC-USDT BUY CLOSE CLOSE
Time: 2025-06-02 17:42:00
Normalized Price: 1.0019
Actual Price: $104206.17", + "BTC-USDT BUY CLOSE CLOSE
Time: 2025-06-02 18:01:00
Normalized Price: 1.0042
Actual Price: $104443.40" + ], + "type": "scatter", + "x": [ + "2025-06-02T17:42:00", + "2025-06-02T18:01:00" + ], + "xaxis": "x2", + "y": [ + 1.0019136186227215, + 1.004194519722396 ], "yaxis": "y2" }, @@ -4404,10 +4648,14 @@ "yaxis": "y3" }, { + "line": { + "color": "black", + "width": 2 + }, "marker": { "color": "green", "size": 12, - "symbol": "square" + "symbol": "triangle-up" }, "mode": "markers", "name": "COIN BUY CLOSE", @@ -4448,10 +4696,14 @@ "yaxis": "y3" }, { + "line": { + "color": "black", + "width": 2 + }, "marker": { "color": "red", "size": 12, - "symbol": "square" + "symbol": "triangle-down" }, "mode": "markers", "name": "COIN SELL CLOSE", @@ -4963,10 +5215,14 @@ "yaxis": "y4" }, { + "line": { + "color": "black", + "width": 2 + }, "marker": { "color": "green", "size": 12, - "symbol": "square" + "symbol": "triangle-up" }, "mode": "markers", "name": "BTC-USDT BUY CLOSE", @@ -5005,10 +5261,14 @@ "yaxis": "y4" }, { + "line": { + "color": "black", + "width": 2 + }, "marker": { "color": "red", "size": 12, - "symbol": "square" + "symbol": "triangle-down" }, "mode": "markers", "name": "BTC-USDT SELL CLOSE", @@ -6032,9 +6292,9 @@ }, "text/html": [ "
\n", - "