Two triggers
A moving-average cross (EMA, SMA or Hull, 9/21 by default) or a Supertrend flip — or either one.
Signals & automation
Vega Trend Rider prints buy and sell signals on TradingView. One alert sends them to the Vega webhook bot, which checks its safety limits and places the order — on paper first, then with your broker.
How it connects
01
Vega Trend Rider runs on your TradingView chart and confirms each BUY or SELL on bar close.
02
One TradingView alert ('Any alert() function call') fires a JSON message for every buy, sell, stop move and exit.
03
TradingView posts that JSON to your bot's private URL, protected by a secret token.
04
The bot checks its safety limits, sizes the position by risk, and places the order with a protective stop.
05
Paper account first, then a crypto exchange, a US broker, or an Indian broker through OpenAlgo.
The indicator
A moving-average cross (EMA, SMA or Hull, 9/21 by default) or a Supertrend flip — or either one.
Trend EMA 200, Supertrend direction, MA stack, slope, higher-timeframe trend, smoothed RSI, MACD, ADX, over-extension, wick traps, volume, squeezes and a TD Sequential exhaustion guard.
Aggressive (60%), Balanced (75%) or Conservative (90%) of the enabled confirmations must agree before a signal prints.
Initial stop at 1.5×ATR, move to breakeven at +1R, then an ATR trailing stop that lets winners run. Exit labels show the result in R.
Auto picks the preset from the symbol: Crypto is long + short with a 3×ATR trail (best on 4H); Stocks / ETFs is long only with a 4×ATR trail (best on 1D).
Signals are confirmed on bar close, so a BUY you saw yesterday is still there today. A minimum gap between signals stops chop.
Buy / sell alerts
Example webhook message
{
"signal": "buy",
"ticker": "BTCUSDT",
"tf": "240",
"price": 80000,
"stop": 78000
}Webhook URL: https://YOUR-SERVER/webhook?token=YOUR_SECRET. API keys stay in environment variables on your server — never in the alert.
Integrations
Any market
Simulated account with fees, so you can watch the bot for weeks before any real money is involved.
Crypto · 100+ exchanges
Binance, Bybit, OKX, Kraken and more through the CCXT library — testnet supported.
US stocks & ETFs
Paper or live US equities through Alpaca's API.
Indian brokers · NSE / BSE
Route orders to Indian brokers supported by a self-hosted OpenAlgo server (CNC / MIS products).
Charts & alerts
Indicators are Pine Script v6. Alerts are sent by TradingView's own webhook feature.
Safety limits
0.5%
Risk per trade
Equity lost if the initial stop is hit (default).
50%
Max position
Largest single position as a share of equity.
6
Trades per day
New entries stop after the daily cap.
2%
Daily loss limit
No new trades for the day after this loss.
120s
Duplicate guard
Repeated alerts inside the window are ignored.
STOP
Kill switch
Create a STOP file (or set enabled: false) to halt new entries instantly.
Notifications
Every signal can notify you through TradingView itself: mobile app push, email, on-screen pop-up and sound — alongside the webhook.
The bot writes every action — entries, stop moves, exits, blocked trades and why — to a CSV journal you can open in Excel.
Instant trade confirmations and daily summaries from the bot to your phone.
End-of-day email with open positions, closed trades in R, and any limits that were hit.
Live chart
BTC/USDT on the 4-hour chart with Supertrend — one of the two Vega Trend Rider triggers. Add Vega Trend Rider itself from TradingView to see its buy and sell labels.
What the backtests showed
| Market | Setup | Result |
|---|---|---|
| Crypto · 6 coins · 4H | Long + short, 3×ATR trail | Profitable on 6 of 6 coins, median profit factor ≈ 1.4 |
| US stocks · 12 names · 1D | Long only, 4×ATR trail | Portfolio ≈ 8% a year, max drawdown ≈ 14% |
| Indian stocks · 12 names · 1D | Same as US | Not reliable — lost money 2014–2020 |
| Any market · 1H or lower | — | Lost money after fees |
Win rate is about 25%: profits come from a few large trends, so expect strings of small losses. Paper-trade before using real money.