Files
trading_bot_v4/workflows/trading/moneyline_1min_data_feed.pinescript
mindesbunister 4458cd1dae feat: Add 1-minute market data TradingView indicator and setup guide
- Created Pine Script indicator: moneyline_1min_data_feed.pinescript
  * Calculates ADX, ATR, RSI, volumeRatio, pricePosition, MA gap
  * Sends JSON with action="market_data_1min" every bar close
  * Uses same metrics as v9 indicator for consistency
  * Alert fires every 1 minute on 1-min chart

- Created setup guide: docs/1MIN_ALERTS_SETUP.md
  * Step-by-step TradingView alert configuration (SOL/ETH/BTC)
  * Alert slot usage: 3 needed, 16 remaining free (no upgrade needed)
  * n8n workflow validation steps (already has Is 1min Data? condition)
  * 24-48 hour testing procedures
  * Troubleshooting guide for common issues
  * Integration plan for ADX validation in revenge system

- Verified n8n workflow ready:
  * market_data_handler.json has "Is 1min Data?" condition (checks action === market_data_1min)
  * Forwards to http://trading-bot-v4:3000/api/trading/market-data
  * Responds with {success: true, cached: true}
  * NO workflow changes needed - infrastructure already prepared

Alert volume: 180/hour (60 per symbol) = 129,600/month
Storage impact: 19.44 MB/month (negligible)
Cost: $0/month (no TradingView upgrade required)

Ready to implement - user can create alerts immediately
Next: Validate 24-48 hours, then integrate ADX confirmation in revenge system
2025-11-27 08:53:28 +01:00

41 lines
1.6 KiB
Plaintext

//@version=5
indicator("Money Line - 1min Data Feed", overlay=false)
// ==========================================
// PURPOSE: Send market data every 1 minute
// USAGE: Create alert with "Once Per Bar Close"
// WEBHOOK: https://flow.egonetix.de/webhook/tradingview-bot-v4
// ==========================================
// Calculate indicators (same as v9 for consistency)
atr = ta.atr(14)
adx = ta.dmi(14, 14)
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)
// Alert message - JSON format
// Note: Use action "market_data_1min" to distinguish from trend-change alerts
alertMessage = '{"action":"market_data_1min","symbol":"' + syminfo.ticker +
'","timeframe":"1","atr":' + str.tostring(atr) +
',"adx":' + str.tostring(adx) +
',"rsi":' + str.tostring(rsi) +
',"volumeRatio":' + str.tostring(volumeRatio) +
',"pricePosition":' + str.tostring(pricePosition) +
',"currentPrice":' + str.tostring(close) +
',"maGap":' + str.tostring(maGap) +
',"indicatorVersion":"v9"}'
// Alert condition: Every bar close (fires every 1 minute on 1-min chart)
alertcondition(true, title="1min Data Feed", message=alertMessage)