Files
trading_bot_v4/workflows
mindesbunister 565b42a56c fix: Use alert() function instead of alertcondition for dynamic JSON
Pine Script alertcondition() requires const string (no variables allowed)
Switched to alert() function which supports series string (dynamic values)

Changes:
- Removed alertcondition(), added if barstate.isconfirmed + alert()
- Build JSON message with all metrics dynamically
- alert.freq_once_per_bar ensures one alert per candle close
- Now includes all required fields: atr, adx, rsi, volumeRatio, pricePosition, maGap

Alert setup in TradingView:
1. Add indicator to 1-minute chart
2. Create alert on indicator
3. Condition: 'alert() function calls' (not alertcondition)
4. Frequency: Once Per Bar Close
5. Message: Use {{strategy.order.alert_message}} or leave blank
2025-11-27 09:02:12 +01:00
..