import LogoutBar from "../components/LogoutBar.astro";
A systematic pipeline that reads TradingView signals, validates risk rules, and automatically rotates between leveraged ETFs based on momentum and trend conditions.
Every trade follows the same path. No manual intervention required.
Pine Script strategy fires. Payload includes symbol, action, price, ATR, signal_id.
DNS + SSL + WAF. Webhook authenticated with shared secret. Replay protection via signal_id.
Checks position size, daily loss limit, ATR stop distance. Rejects invalid signals with reason log.
Determines bull vs bear ETF. Closes existing position, opens new bracket order.
IBKR API. Entry + stop-loss + take-profit as bracket. Paper mode default.
The system rotates between SPXL and SPXS (or TQQQ/SQQQ) based on these conditions:
| CONDITION | INDICATORS | ACTION | ETF TARGET |
|---|---|---|---|
| Strong bullish trend | EMA9 > EMA20 · Price > VWAP · RSI 50-70 | BUY BULL | SPXL / TQQQ |
| Momentum confirmed | MACD histogram positive · ATR expanding | HOLD BULL | SPXL / TQQQ |
| Trend weakening | EMA crossunder · RSI near 50 · MACD flat | CLOSE | CASH |
| Bearish momentum | EMA9 < EMA20 · Price < VWAP · RSI 30-50 | BUY BEAR | SPXS / SQQQ |
| Oversold extreme | RSI < 30 · VIX spike · ATR elevated | WAIT | NO TRADE |
The TradingView strategy that generates the webhook payload. Runs on 5-minute bars.
These rules run before every order. A single failed check cancels the trade and logs the reason.
Illustrative only — based on strategy logic applied to generated data. Not a guarantee of future results.
Paste this into your TradingView alert message. TrendTrooper parses and validates each field.
Point your TradingView alert to your Cloudflare domain. Set method to POST, content-type to application/json.
Generate a strong random secret. Set it in both your TradingView alert and your TrendTrooper environment config.
Always validate the full pipeline in paper mode before switching to live. Check logs after each test signal.