feat: Add 15-minute chart filter to n8n workflow

- Extract timeframe from TradingView message format: 'SOLUSDT.P 15'
- Added 'timeframe-filter' IF node after Parse Signal
- Only allows trades on 15-minute chart signals
- Blocks 5-minute and other timeframe signals
- Regex pattern: \.P\s+(\d+) matches '.P 15' format

This prevents bot from trading on wrong timeframe alerts.
This commit is contained in:
mindesbunister
2025-10-27 13:11:52 +01:00
parent 14d5de2c64
commit 17b0806ff3

View File

@@ -32,7 +32,7 @@
},
{
"name": "timeframe",
"stringValue": "5"
"stringValue": "={{ $json.body.match(/\\.P\\s+(\\d+)/)?.[1] || '15' }}"
}
]
},
@@ -44,6 +44,24 @@
"typeVersion": 3.2,
"position": [440, 400]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.timeframe }}",
"operation": "equals",
"value2": "15"
}
]
}
},
"id": "timeframe-filter",
"name": "15min Chart Only?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [540, 400]
},
{
"parameters": {
"method": "POST",
@@ -72,7 +90,7 @@
"name": "Check Risk",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [640, 400]
"position": [740, 400]
},
{
"parameters": {
@@ -89,7 +107,7 @@
"name": "Risk Passed?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [840, 400]
"position": [940, 400]
},
{
"parameters": {