Files
trading_bot_v4/workflows/trading/moneyline_1min_data_feed.pinescript
mindesbunister cb0297607b fix: Change 1-min indicator to use trading signal format (timeframe filtering)
Now follows same pattern as 15min/1H/Daily data collection:
- Sends trading signal format: 'SOLUSDT buy 1 | ATR:X | ADX:Y...'
- Bot's execute endpoint filters by timeframe='1' (no trades executed)
- Saves to BlockedSignal table for analysis
- Uses SAME webhook as trading signals (no separate webhook needed)

This is simpler than separate market_data endpoint approach.
Bot already handles this pattern for multi-timeframe data collection.
2025-11-27 09:30:08 +01:00

36 lines
1.7 KiB
Plaintext

//@version=6
indicator("Money Line - 1min Data Feed", overlay=false)
// ==========================================
// PURPOSE: Send market data every 1 minute for cache updates
// USAGE: Create alert on indicator with "alert() function calls"
// WEBHOOK: https://flow.egonetix.de/webhook/tradingview-bot-v4 (SAME as trading signals)
// FORMAT: Uses trading signal format with timeframe="1" (gets filtered like 15min/1H/Daily)
// ==========================================
// Calculate indicators (same as v9 for consistency)
atr = ta.atr(14)
[diPlus, diMinus, adx] = ta.dmi(14, 14) // ADX returns tuple in Pine v5+
rsi = ta.rsi(close, 14)
volumeRatio = volume / ta.sma(volume, 20)
pricePosition = (close - ta.lowest(low, 100)) / (ta.highest(high, 100) - ta.lowest(low, 100)) * 100
// Moving averages for MA gap analysis
ma50 = ta.sma(close, 50)
ma200 = ta.sma(close, 200)
maGap = math.abs((ma50 - ma200) / ma200 * 100)
// Display values (optional - for visual confirmation)
plot(adx, "ADX", color=color.blue, linewidth=2)
hline(20, "ADX 20", color=color.gray, linestyle=hline.style_dashed)
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'
// Send alert every bar close
if barstate.isconfirmed
alert(jsonMessage, alert.freq_once_per_bar)