QATS HELP CENTER · TRADING

Write indicators and strategies with QATS Script

Use Script Studio and its AI builder to draw indicators and backtest strategies against prop rules.

Open Trading terminal All guides
Before you start

Open Script Studio from the terminal bar. Scripts draw indicators and simulate strategies; they never send orders.

ON THIS SCREENFind the highlighted controls Click to enlarge
What to look for

Select a numbered step to zoom straight to that control.

Illustrative QATS screen from a test account. Your plan, balances and available actions may differ.
01 / 04

Open Script Studio

  1. 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.

  2. Start from New script, My scripts or Templates: RSI bounce, EMA cross, Bollinger breakout, VWAP reclaim, Supertrend follow or MACD momentum.

  3. Write in QATS Script, a Pine-like language: indicator(…) or strategy(…), plots, inputs, alertcondition and strategy.entry, exit and close. Reference lists every function.

  4. 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.

02 / 04

Let the AI builder write or fix code

  1. Describe what you want in plain words, for example “EMA 20/50 cross on BTCUSDT with a 1% stop”.

  2. Choose Write new, Change this script, Explain, or Fix errors when the script has errors.

  3. 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.

  4. The builder takes up to 30 requests an hour. When you reach the limit, your scripts and the editor stay available.

03 / 04

Add to the chart and backtest

  1. 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.

  2. 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.

  3. 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.

  4. Entries fill at the next bar’s open. If one bar touches both stop and target, the backtest assumes the stop.

04 / 04

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.
WHEN YOU NEED A HAND

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.

CHECK YOUR RESULT

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.
NEXT STEP

Continue in QATS

Open the relevant screen to follow the steps in this guide.

Open Trading terminal
KEEP EXPLORING

Related guides

All topics
TradingUse the QATS chartChart types, timeframes, indicators, drawings and trading from the chart.API & automationRun a strategy with QATS BotOpen a Strategy Builder workspace, bind a strategy to an account, and start or stop the bot.API & automationConnect TradingViewOne personal webhook URL: alerts, Pine strategies and the QATS Ticket indicator, with the alert log and fixes for refusals.
Still need help?

Tell us where you got stuck. Never share passwords or access keys.