Open Script Studio from the terminal bar. Scripts draw indicators and simulate strategies; they never send orders.
Select a numbered step to zoom straight to that control.
Open Script Studio
In Trading terminal, choose the Script Studio icon in the terminal bar (tooltip QATS Script: indicators, strategies and backtests). A badge shows how many scripts are on the chart.
Start from New script, My scripts or Templates: RSI bounce, EMA cross, Bollinger breakout, VWAP reclaim, Supertrend follow or MACD momentum.
Write in QATS Script, a Pine-like language: indicator(…) or strategy(…), plots, inputs, alertcondition and strategy.entry, exit and close. Reference lists every function.
Errors are underlined with their line and column. Fix them before adding the script to the chart.
QATS Script never sends orders. Strategies are simulated on the chart and in the backtest only. To trade automatically, use QATS Bot, the Trading API or TradingView alerts.
Let the AI builder write or fix code
Describe what you want in plain words, for example “EMA 20/50 cross on BTCUSDT with a 1% stop”.
Choose Write new, Change this script, Explain, or Fix errors when the script has errors.
QATS checks the AI’s answer before showing it. If it cannot produce a script that passes the checker, nothing is changed. Undo AI change restores your previous code.
The builder takes up to 30 requests an hour. When you reach the limit, your scripts and the editor stay available.
Add to the chart and backtest
Choose Add to chart. The script draws on the active chart pane with execution prices; up to 8 scripts at a time. Scripts on the chart are cleared when you reload the page.
For a strategy, choose Backtest. Pick 1,000, 3,000 or 5,000 bars and review Commission per fill (0.05% at first) and Slippage (1 tick at first). Capital is your account size.
Read PROP RULES CHECK first: it tests the result against your daily loss, maximum loss and profit target. Then read Net P&L, trades, win rate, profit factor, max drawdown and the equity curve.
Entries fill at the next bar’s open. If one bar touches both stop and target, the backtest assumes the stop.
Save and know the limits
- Save keeps a script on QATS, private to you. You can keep up to 50; a script with errors saves as a draft.
- A script can be up to 20,000 characters and 600 lines, with up to 24 plots, 40 inputs and 20 alerts.
- This version has no loops, custom functions, arrays, labels or tables, no other symbols or timeframes, and no limit or stop strategy entries.
- An alertcondition shows as a terminal notice on each newly closed bar while the terminal is open. It is not a server-held price alert.
Common questions
Can my script trade for me?
No. QATS Script only draws and backtests. Use QATS Bot, the Trading API or TradingView alerts for automated orders.
The AI builder changed nothing.
QATS shows AI code only when it passes the checker. Rephrase the request, or choose Fix errors on your current script. The builder allows up to 30 requests an hour.
You’re done when…
Your script passes the checker and is on the chart, or its backtest shows the prop rules check.
If this does not match what you see, use Common questions above or contact support with the page and account details.Continue in QATS
Open the relevant screen to follow the steps in this guide.
Tell us where you got stuck. Never share passwords or access keys.