Files
trading_bot_v4/QUICK_SETUP_CARD.md
mindesbunister 22195ed34c Fix P&L calculation and signal flip detection
- Fix external closure P&L using tp1Hit flag instead of currentSize
- Add direction change detection to prevent false TP1 on signal flips
- Signal flips now recorded with accurate P&L as 'manual' exits
- Add retry logic with exponential backoff for Solana RPC rate limits
- Create /api/trading/cancel-orders endpoint for manual cleanup
- Improves data integrity for win/loss statistics
2025-11-09 17:59:50 +01:00

2.3 KiB
Raw Blame History

Quick Reference - Your Setup Info

Your Trading Bot Status

  • Container: Running and healthy
  • Endpoint: Working correctly
  • Server IP: 10.0.0.48

📋 YOUR WEBHOOK URL

Use this URL in TradingView alerts:

http://10.0.0.48:3001/api/trading/market-data

OR if you have n8n setup as proxy:

https://flow.egonetix.de/webhook/market-data

📝 COPY-PASTE CHECKLIST

When creating EACH alert in TradingView:

1 CONDITION

time("1")  changes

2 WEBHOOK URL

http://10.0.0.48:3001/api/trading/market-data

3 ALERT MESSAGE (full JSON)

{
  "action": "market_data",
  "symbol": "{{ticker}}",
  "timeframe": "{{interval}}",
  "atr": {{ta.atr(14)}},
  "adx": {{ta.dmi(14, 14)}},
  "rsi": {{ta.rsi(14)}},
  "volumeRatio": {{volume / ta.sma(volume, 20)}},
  "pricePosition": {{(close - ta.lowest(low, 100)) / (ta.highest(high, 100) - ta.lowest(low, 100)) * 100}},
  "currentPrice": {{close}}
}

4 SETTINGS

  • Frequency: Once Per Bar Close
  • Expiration: Never
  • Notifications: ONLY Webhook URL (uncheck all others)

🎯 THE 3 ALERTS YOU NEED

# Symbol Alert Name
1 SOLUSDT Market Data - SOL 5min
2 ETHUSDT Market Data - ETH 5min
3 BTCUSDT Market Data - BTC 5min

All on 5-minute charts, all using same config above.


VERIFICATION COMMAND

After creating alerts, wait 5 minutes, then run:

curl http://localhost:3001/api/trading/market-data

You should see symbols appear:

{
  "success": true,
  "availableSymbols": ["SOL-PERP", "ETH-PERP", "BTC-PERP"],
  "count": 3
}

🆘 IF SOMETHING GOES WRONG

Check bot logs:

docker logs -f trading-bot-v4

Watch for incoming POST requests when bar closes.

Test from external machine:

curl http://10.0.0.48:3001/api/trading/market-data

If this fails → port 3001 blocked by firewall.


📖 DETAILED GUIDE

See: TRADINGVIEW_STEP_BY_STEP.md for detailed walkthrough with screenshots.


⏭️ NEXT STEP

After alerts are working and cache is populated:

./scripts/run_exit_analysis.sh

This will analyze your trades and recommend optimal TP/SL levels.