A quick backtest without leaving the browser
Write a strategy() script, press Backtest and PineOps simulates the orders on the loaded bars. Entries and exits are marked on the chart and the console prints a report.
How orders are filled
- Market orders fill at the open of the next bar.
- Limit and stop orders fill when a later bar's range reaches the price (or at the open if it gaps through).
strategy.exitsupportsstop,limit, andloss/profitin ticks.default_qty_type(fixed, cash, percent of equity),pyramidingand commission are honoured.
This is a simplified emulator intended for checking logic. It does not model slippage, margin, intrabar order sequencing or trailing stops, so treat the numbers as a sanity check and not as a performance claim.
Frequently asked questions
Can I backtest on my own data?
Yes. Use Load CSV under the chart. The file needs a header row with open, high, low and close columns; time and volume are optional.
Are these results investment advice?
No. The tester is an educational tool running on sample data with a simplified fill model. Past simulated performance does not predict future results.
Is this the official TradingView compiler?
No. PineOps is an independent Pine Script engine written from scratch that runs in your browser. It checks syntax and version rules, executes your script bar by bar and plots the result. It covers a large subset of the language; anything it does not support yet is reported as a clear error rather than silently ignored.
Is my code sent to a server?
No. Compilation and execution happen entirely in your browser. Share links store the code in the URL fragment, which browsers do not send to servers.
Related tools
- Pine compilerCheck, run and chart v4 · v5 · v6 scripts in your browser — nothing to install, nothing uploaded.
- Pine v6The current Pine version, with v6 rules enforced.
- Pine v5Namespaces, switch, while loops, types and methods.
- Pine v4Legacy study() scripts still run here — and convert in one click.
- v4 → v5 converterPaste v4 code, press → v5 or → v6, then Compile to verify.
- PythonPython 3 via WebAssembly — runs on your device.
- JavaScriptSandboxed Web Worker with top-level await.
- TypeScriptTranspiled by the real TypeScript compiler, then executed.