The Pain
Pine Script v5 has 47 built-in series, 31 plot functions, half-a-dozen ways to express the same trailing stop. Backtrader wants you to subclass Strategy and emit signals from inside next(). MQL5 wants OnInit + OnTick. AFL wants Buy/Sell arrays. AmiBroker wants its own version. Each ecosystem assumes you already know it.
But the strategy itself is usually one sentence: “Buy BANKNIFTY 9:30 ATM call when 5-min RSI < 30 and the previous candle is bullish.”
Translating that sentence to working code shouldn't take a weekend. TradeBud does it in a minute.
How the Pipeline Works
Under the hood, TradeBud is not one prompt — it's five cooperating agents, each owning one job. The handoffs are what make the output reliable. We use Anthropic Claude (Sonnet 4.6 for reasoning, Haiku 4.5 for the cheap intermediate steps) and structured JSON between every stage.
- Strategy Parser — reads your sentence (or YouTube transcript via
youtube-transcript-api) and lifts out a typed structure: instrument, timeframe, entry conditions, exit conditions, position sizing, filters. No code yet — just the rules. - Script Generator — takes that structure and produces actual code in the target format. Streaming output so you see the script appear character by character, ~1 second to first token.
- Syntax Validator — statically checks the generated code, then asks Claude to second-read it. If it spots issues, it returns errors to the Generator which fixes them. Retries up to 3 times. Most strategies validate on the first pass.
- Backtester — pulls 60-90 days of OHLCV from Groww (primary) or Twelve Data (fallback), auto-computes any indicators referenced in the rules (RSI, EMA, VWAP, MACD, pivot points), evaluates each candle, opens and closes paper positions, tracks P&L. Slippage modelled.
- Report Generator — turns the trade list into Plotly equity curves, win-rate heatmaps, and a Claude-narrated summary. The narration is short and honest: “14 trades, 64% WR, but profit factor only 1.2 — your winners aren't much bigger than your losers.”
8 Output Formats — Pick Your Broker
One strategy, eight downstream destinations. Generate once, export wherever you want to run it:
- Pine Script v5 + v6 — paste straight into TradingView
- Python (Backtrader) — for backtest scaffolding in your own notebook
- Python (Zipline) — if you already use Quantopian-style frameworks
- AFL (AmiBroker) — for the desktop AmiBroker users still trading off ladders
- MQL5 (MetaTrader 5) — for FX-style automation
- Streak (Zerodha) — Zerodha's native algo platform
- Alert JSON — for webhook-based execution stacks (n8n, Zapier, your own bot)
A Real Example
You type into /chat:
Mean-reversion on NIFTY 5-minute. Enter long when RSI(14) closes below 30 and price is within 0.5% of the previous day's low pivot. Exit at +1.5% or stop-loss at −0.8%. Maximum 3 trades per day.
~50 seconds later you have:
- A working Pine Script v5 strategy that compiles in TradingView with zero edits
- A backtest over the last 60 days of NIFTY 5-min data
- Equity curve, trade-by-trade scatter, per-day P&L breakdown
- Claude's assessment: “14 trades, 64% WR, profit factor 1.78. Drawdown is shallow but you bled on 2 trend days—consider a regime filter.”
- One-click listing on the marketplace if you want to monetise it (70% revenue share)
Why the Swarm Backtest Matters
Single backtests lie. A 65% win rate on 14 trades is inside random-walk noise. TradeBud runs your strategy through 5 personas in parallel (Scalper Sam, Swing Rider Maya, Options Oracle, Risk Manager Rohan, Contrarian Cathy), each with different stops, slippage assumptions, and rejection thresholds. The verdict is consensus, not optimism:
- TRADE if ≥60% of personas vote yes
- CAUTION if 2+ flag concerns
- SKIP if the strategy doesn't survive realistic slippage
That's the difference between “backtest looked beautiful” and “survives reality.”
Why Not Just Ask ChatGPT?
People do, and the code usually compiles. But three things break:
- No backtest. ChatGPT gives you the script and stops. You still need OHLCV data, an indicator engine, and the patience to debug why your “sure thing” loses ₹40,000 in week one. TradeBud closes the loop in the same minute.
- No retry on syntax errors. Pine Script changes its dialect quarterly. ChatGPT's training cutoff trails reality. TradeBud's validator catches v4→v5→v6 dialect drift and the generator regenerates.
- No India context. Indian traders deal with NIFTY/BANKNIFTY tick sizes, lot sizes, expiry calendars, intraday MIS vs CNC rules. The pipeline encodes this; ChatGPT doesn't.
Pair it with Shadow Twin
Once your script is live, the next bottleneck is you. The same setup that won 70% in backtest only wins 45% when you trade it — because you take it at the wrong time of day or chase entries you weren't supposed to. Shadow Twin connects to Zerodha or Groww read-only, extracts your actual behavioral patterns, and pings you when you're trading outside your historical edge. How it works →
FAQ
- Is it free?
- Free tier: 2 scripts + 1 live strategy + 90-day backtest per month. Pro (₹799/mo): 15 scripts, 180-day backtest, 5 live strategies, behavioral chat. See pricing.
- Does it auto-trade for me?
- No, and that's intentional. TradeBud generates code and analytics. You decide whether to deploy it. See /disclosures — we are not a SEBI-registered investment advisor and never place trades on your account.
- Which instruments can I backtest?
- NIFTY, BANKNIFTY, FINNIFTY (Indian indices via Groww). Crypto is script-generation only — no backtest because we don't store crypto OHLCV. Equity single stocks are on the roadmap.
- Can I paste a YouTube video instead?
- Yes. The Strategy Parser handles YouTube URLs — it pulls the transcript (or falls back to Claude inferring from the title and channel context when transcripts are blocked) and extracts the same typed structure.
Try it now
Free tier. No credit card. ~1 minute from idea to backtested script.
Describe a strategyEducational use only — TradeBud is not a SEBI-registered investment advisor.