TradingView scripts · Binary options

Binary option strategy testing on TradingView

Start with the free Strategy Tester, and move to the Ultimate Backtester when you need deeper validation.

Binary-options trading is restricted or prohibited in many jurisdictions, including for residents of India. This content is educational, is not directed at residents of jurisdictions where it is restricted, and does not recommend any broker.

Binary options aren’t normal trading. The result of every trade depends on expiry and payout, and a loss costs the whole stake.

TradingView’s standard strategy tester doesn’t model any of that, so its reports answer the wrong question. These two scripts do model it.

Why binary options need their own tester

With a typical payout of 80%, a win returns 0.8 times the stake and a loss costs 1.0.

So you need to win more than 55.6% of trades just to break even. A strategy with a “60% win rate” may still lose money if the payout is lower than you assumed.

A proper binary-options test has to account for:

  • payout: the fixed return on a win, which varies by broker and asset,
  • expiry: how long each option runs,
  • entry timing: the trade opens on the candle after the signal, not the signal candle,
  • one trade at a time: signals that arrive during an open trade are ignored, and
  • Martingale: what really happens to the account when stakes double after a loss.

The two testers

Strategy Tester (Basic) Ultimate Backtester
Price Free, open source Paid, invite-only via JSKAPPS (free trial)
Adding your strategy Paste your buy and sell logic into the script’s code Connect any separate script with a two-line “connector”, no code edits
Expiry One candle (the chart timeframe is the expiry) Choose how many candles to hold
Martingale levels Up to 5 Up to 15, per trade or per signal
Martingale trade types Same, opposite, follow candle colour, opposite candle colour Same four types
Session filter Yes Yes
Date range No Yes
Stop for the day after a run of wins or losses No Yes
Flip buy and sell signals No Yes
Stats Result table: signals, wins and losses by level Recent, daily and monthly win statistics

Both use the same rules: the trade opens at the next candle’s open, a call wins on a green candle and a put on a red one, and only one trade runs at a time.

Quick start

  1. Open the script on TradingView and add it to your chart. Use the symbol and timeframe you actually trade.
  2. Set payout and expiry realistically. Small changes in either can change the result completely, so test a range rather than one optimistic value.
  3. Run the test and read the right numbers. Look at the win rate against your break-even win rate, the drawdown, and the longest losing streak, not just total profit.
  4. Stress-test before risking money. Try different sessions, days, payouts, expiries and small parameter changes. Robust strategies degrade gradually; fragile ones collapse.

FAQ

Do I need a TradingView account? Yes. Both scripts run on TradingView. Depending on your TradingView plan, there may be limits on indicators and features.

Will a good backtest make me money? No tool can promise that. A backtest describes the past under the assumptions you set. It’s a way to reject weak ideas before they cost money.

Can I test any strategy? Yes. Basic needs your logic pasted into its code. Ultimate connects to your own separate script.

Which should I start with? Start with the free Basic tester to learn the workflow. Move to Ultimate when you want longer expiries, deeper Martingale testing, date ranges and daily or monthly stats.

The book

My book Binary Options Strategy Validation explains the whole method: why normal backtesters fail for binary options, how the tester is built, and the tests to run before trading live.

Educational testing tools only. No result is guaranteed. Binary options carry a high risk of losing the whole stake on every trade.