No connection

Search Results

Workflows
No workflows yet
Strategy Sets
Workspace
No files yet.
Write code and save.
*
Strategies
Unlock code
Searching Yahoo Finance...
Classic
tgp API Reference
tgp.ohlcv('AAPL', '1d') → DataFrame (date,open,high,low,close,volume)
tgp.price('AAPL') → float (latest close)
tgp.fundamentals('AAPL') → dict (PE, market_cap, ...)
tgp.news('AAPL', min_score=80) → scored news list
tgp.news_score('AAPL', 80, 10) → bullish/bearish summary
tgp.ohlcv('^VIX') → VIX regime data
tgp.symbols → Symbols list from the Lab input
tgp.event → dict (trigger event data)
Indicators
tgp.sma(series, period) → Simple MA
tgp.ema(series, period) → Exponential MA
tgp.rsi(series, 14) → RSI (0-100)
tgp.macd(series) → (line, signal, hist)
tgp.bbands(series, 20) → (upper, mid, lower)
tgp.atr(high, low, close, 14) → ATR
tgp.stoch(high, low, close) → (%K, %D)
tgp.vwap(high, low, close, vol) → VWAP
Signals
tgp.crossover(a, b) → bool Series (a crosses above b)
tgp.crossunder(a, b) → bool Series (a crosses below b)
tgp.signal(positions) — Required! 1=long, -1=short, 0=flat. Must match data length.
Backtest: outputs metrics. Live: outputs last signal for automation chain.
Premium strategy code is hidden on your plan. You can run a server-side backtest, but code editing and deployment require a paid tier. Upgrade
Preset backtests are open. Log in to edit code, save files, or deploy automations. Log in

Select a workflow from the left, or backtest a strategy and create a paper workflow.

Pinned Sample Event

Loading workflow graph...

Graph not loaded yet
Backtest Results

Run a Backtest, then move the same strategy into paper automation

Your code must end with tgp.signal(positions)

Running backtest...

Return
Buy & Hold
vs B&H
Max DD
Sharpe
Exposure
Win Rate
Trades
Next Step
Paper first
Equity Curve
Recent Trades
Side Entry Exit Return

Pick a workflow or deploy a tested strategy to run workflow experiments here.

Workflow Test Bench
Full Editor
Workflow Health
Runs
Errors
Mode
Selected Node
Type
Status

                        
Select a node on the canvas.
Replay Result
Conditions
Side effects
Dry Run Actions
Playground Variants
No variants returned for this sample.

Deploy as Automation

A private webhook URL will be generated after deployment. External alerts can call it, then this strategy code runs through the same paper workflow.
Data comes from Yahoo for strategy evaluation; paper orders use cTrader-compatible symbol mapping. Live orders stay behind the cTrader live-readiness gate.
You haven't backtested this strategy yet. Consider running a backtest first.
Backtest Truth Engine grade is low. Keep this in paper mode and improve sample size, drawdown, or cost assumptions before live use.
Strategy will run in paper trading mode. Review replay, dry-run, playground variants, and live-readiness before any cTrader live promotion.
Strategy Copilot
Code • Backtest • Workflow
Hi! I'm your Strategy Lab copilot.

I can write trading strategies, debug your code, run backtests, and help tune workflows. Try:
• "Write an RSI divergence strategy for TSLA"
• "Add ATR-based stop loss to my code"
• "Backtest this"
• "Deploy it to run every weekday at 9:30"
Home
Terminal
AI Chat
Markets
Profile