PositionRelay TV Slave Subscriber
- Utilities
- Version: 1.0
PositionRelay TV Slave Subscriber mirrors TradingView webhook signals from the PositionRelay cloud to your MetaTrader 5 follower accounts. It polls the virtual TradingView source account (not an MT5 master) and copies open, close, and modify actions with TV_ ticket comments.
Companion products: PositionRelay Master Publisher and PositionRelay Slave Subscriber for MT5 master→slave copy trading. Use a dedicated slave EA per product line — do not run master and TV sources on the same slave simultaneously.
Requirements:
- Active PositionRelay subscription with TV Sync (TV Sync plan, or Pro/Ultimate which include TV Sync)
- TradingView Plus+ with 2FA and webhook alerts configured (see TradingView setup guide on positionrelay.com)
- PositionRelay User ID from your positionrelay.com dashboard
- Webhook URL and secret from the dashboard setup wizard (for TradingView alerts)
- Unique InpAccountLabel per slave terminal
- Stable internet connection on each slave terminal
Setup:
1. Create an account and subscribe at positionrelay.com
2. Choose the TV Sync plan (or Pro/Ultimate) and copy webhook URL + secret from the dashboard setup wizard
3. Import the published StrategyWebhookJson Pine library (lifestylemaniacsrt/StrategyWebhookJson/1) and configure TradingView alerts
4. Install PositionRelay TV Slave Subscriber from the Market
5. Attach the EA to one chart on each follower account
6. Enter your PositionRelay User ID and a unique InpAccountLabel per slave
7. Configure lot mode and risk settings
8. Enable Algo Trading and allow WebRequest for https://ea-sync-production.up.railway.app (Tools → Options → Expert Advisors)
The EA connects to the PositionRelay cloud API automatically — endpoint URLs are built into the EA and are not user inputs.
The EA polls the cloud relay for TradingView-sourced positions, opens missing trades, closes positions removed upstream, and updates stop loss and take profit when changed. Mirrored trades use TV_ ticket comments for reconciliation. Periodic self-reporting keeps slave status visible in the dashboard.
Input parameters:
- InpUserId: your PositionRelay account identifier
- InpAccountLabel: unique label per slave terminal
- InpPollingIntervalSecs: seconds between position polls (default 5)
- InpSelfReportSecs: seconds between dashboard self-reports
- InpHistoryLookbackDays: days of closed history to include in self-reports
- InpLotMode: fixed, scaled (master lot × factor), or balance-adapted lot sizing
- InpFixedLotSize: lot size when using fixed mode (also fallback when master balance unavailable)
- InpLotScaleFactor: multiplier on master lot when using scaled mode
- InpMaxSlippage: max slippage in points on market orders
- InpMagicNumber: magic number for slave trades
- InpOneTradePerSymbol: limit to one open trade per symbol
- InpAllowLotResize: resize lots when upstream size changes
- InpLotResizeTolerance: minimum lot delta before resize
- InpDemoMode: log actions without executing trades (dry run)
Plan limits (cloud subscription):
- TV Sync plan: TradingView → MT5 only (1 TV source · 1 TV slave)
- Pro and Ultimate: TV Sync included (Pro up to 5 TV slaves, Ultimate up to 20)
- Starter is MT5 copy only and does not include TV Sync
Keywords: TradingView, Pine Script, webhook, alert automation, MT5 sync, strategy alerts, automated trading
