diff --git a/workflows/trading/check_risk_with_quality.json b/workflows/trading/check_risk_with_quality.json new file mode 100644 index 0000000..7ddb68b --- /dev/null +++ b/workflows/trading/check_risk_with_quality.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "method": "POST", + "url": "http://10.0.0.48:3001/api/trading/check-risk", + "authentication": "genericCredentialType", + "genericAuthType": "httpHeaderAuth", + "sendHeaders": true, + "headerParameters": { + "parameters": [ + { + "name": "Authorization", + "value": "Bearer 2a344f0149442c857fb56c038c0c7d1b113883b830bec792c76f1e0efa15d6bb" + }, + { + "name": "Content-Type", + "value": "application/json" + } + ] + }, + "sendBody": true, + "specifyBody": "json", + "jsonBody": "={\n \"symbol\": \"{{ $json.symbol }}\",\n \"direction\": \"{{ $json.direction }}\",\n \"atr\": {{ $json.atr || 0 }},\n \"adx\": {{ $json.adx || 0 }},\n \"rsi\": {{ $json.rsi || 0 }},\n \"volumeRatio\": {{ $json.volumeRatio || 0 }},\n \"pricePosition\": {{ $json.pricePosition || 0 }}\n}", + "options": {} + }, + "name": "Check Risk (with Quality Scoring)", + "type": "n8n-nodes-base.httpRequest", + "typeVersion": 4.2, + "position": [ + -340, + 560 + ], + "notes": "Updated to send 5 context metrics for signal quality scoring:\n- ATR% (volatility)\n- ADX (trend strength)\n- RSI (momentum)\n- Volume Ratio (participation)\n- Price Position (range position)\n\nMinimum quality score: 60/100" +} diff --git a/workflows/trading/execute_trade_with_metrics.json b/workflows/trading/execute_trade_with_metrics.json new file mode 100644 index 0000000..fd04046 --- /dev/null +++ b/workflows/trading/execute_trade_with_metrics.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "method": "POST", + "url": "http://10.0.0.48:3001/api/trading/execute", + "authentication": "genericCredentialType", + "genericAuthType": "httpHeaderAuth", + "sendHeaders": true, + "headerParameters": { + "parameters": [ + { + "name": "Authorization", + "value": "Bearer 2a344f0149442c857fb56c038c0c7d1b113883b830bec792c76f1e0efa15d6bb" + }, + { + "name": "Content-Type", + "value": "application/json" + } + ] + }, + "sendBody": true, + "specifyBody": "json", + "jsonBody": "={\n \"symbol\": \"{{ $('Parse Signal Enhanced').item.json.symbol }}\",\n \"direction\": \"{{ $('Parse Signal Enhanced').item.json.direction }}\",\n \"timeframe\": \"{{ $('Parse Signal Enhanced').item.json.timeframe }}\",\n \"signalStrength\": \"strong\",\n \"atr\": {{ $('Parse Signal Enhanced').item.json.atr || 0 }},\n \"adx\": {{ $('Parse Signal Enhanced').item.json.adx || 0 }},\n \"rsi\": {{ $('Parse Signal Enhanced').item.json.rsi || 0 }},\n \"volumeRatio\": {{ $('Parse Signal Enhanced').item.json.volumeRatio || 0 }},\n \"pricePosition\": {{ $('Parse Signal Enhanced').item.json.pricePosition || 0 }}\n}", + "options": { + "timeout": 120000 + } + }, + "name": "Execute Trade (with Context Metrics)", + "type": "n8n-nodes-base.httpRequest", + "typeVersion": 4.2, + "position": [ + 60, + 560 + ], + "notes": "Updated to send 5 context metrics for database storage:\n- ATR% at entry\n- ADX at entry\n- RSI at entry\n- Volume Ratio at entry\n- Price Position at entry\n\nThese metrics are stored with each trade for post-trade analysis." +}