fix: Add close price to 1-minute data feed webhook
PROBLEM:
- Logs showing wrong prices: $30-43 when SOL actually at $141-144
- Webhook message missing close price field
- Bot falling back to RSI/ATR values (30-40 range)
ROOT CAUSE:
- TradingView indicator sending: 'SOLUSDT buy 1 | ATR:X | ADX:Y...'
- No @ price field in message
- n8n couldn't extract signalPrice, bot used wrong fallback
SOLUTION:
- Added close price to webhook format
- New format: 'SOLUSDT buy 1 @ 143.50 | ATR:X | ADX:Y...'
- Matches main trading signal format (v9 uses same pattern)
IMPACT:
- Logs will now show correct SOL price ($141-144)
- Database signalPrice field accurate
- BlockedSignalTracker can calculate correct P&L movements
FILES CHANGED:
- workflows/trading/moneyline_1min_data_feed.pinescript
User deployed updated indicator to TradingView ✅
Next 1-minute alert will show correct price
This commit is contained in:
@@ -28,7 +28,8 @@ hline(25, "ADX 25", color=color.orange, linestyle=hline.style_dashed)
|
||||
// Build JSON message using TRADING SIGNAL format (gets filtered by timeframe="1")
|
||||
// Direction doesn't matter - bot filters by timeframe before executing
|
||||
// This follows same pattern as 15min/1H/Daily data collection
|
||||
jsonMessage = 'SOLUSDT buy 1 | ATR:' + str.tostring(atr) + ' | ADX:' + str.tostring(adx) + ' | RSI:' + str.tostring(rsi) + ' | VOL:' + str.tostring(volumeRatio) + ' | POS:' + str.tostring(pricePosition) + ' | IND:v9'
|
||||
// CRITICAL: Include close price so bot logs correct price (not RSI/ATR value)
|
||||
jsonMessage = 'SOLUSDT buy 1 @ ' + str.tostring(close) + ' | ATR:' + str.tostring(atr) + ' | ADX:' + str.tostring(adx) + ' | RSI:' + str.tostring(rsi) + ' | VOL:' + str.tostring(volumeRatio) + ' | POS:' + str.tostring(pricePosition) + ' | IND:v9'
|
||||
|
||||
// Send alert every bar close
|
||||
if barstate.isconfirmed
|
||||
|
||||
Reference in New Issue
Block a user