TradingView Indicator Invite-only

Binary Option Ultimate Backtester

Backtest any binary-options strategy with real payout, expiry and Martingale rules. Connect your own script with two lines; no code edits.

Published 16 July 2023 · Version 1

Binary Option Ultimate Backtester
Binary Option Ultimate Backtester on a EUR/USD 2-minute chart, with tables of wins by Martingale level for calls and puts, profit and loss, streaks, and win statistics by day and by month

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.

TradingView’s standard strategy tester doesn’t understand binary options. It has no idea of a fixed payout, a fixed expiry, or a loss that costs the whole stake, so its reports answer the wrong question.

The Ultimate Backtester models those rules properly, and lets you test any strategy with advanced trade management.

How the test works

  • The trade opens at the open of the next candle after a signal.
  • A call wins on a green candle, a put on a red one.
  • One trade at a time: signals that arrive while a trade is open are ignored.

Connect your own strategy

Add two lines to your own indicator, where is_call and is_put are your buy and sell conditions:

Signal = is_call ? 1 : is_put ? -1 : 0
plot(Signal, title="🔌Connector🔌", display = display.none)

Then choose your script under Add Your Binary Strategy. The plot is invisible on the chart, and you never edit the backtester’s code.

What you can test

Strategy

  • Calls only, puts only, or both.
  • Candles to hold: the expiry, as a number of candles. Testing on 15-minute candles with a 30-minute expiry? Hold 2.

Martingale

  • Up to 15 Martingale levels.
  • Martingale per trade, or per signal: after a loss, wait for the next signal before staking the recovery amount.
  • Four trade types for the recovery trades: same direction, opposite direction, follow the candle colour, or opposite the candle colour.

Trade management

  • Initial investment per option and payout percentage.
  • Trading session and date range filters.
  • Early quit: stop for the day after a chosen number of consecutive wins or losses.
  • Buy/sell flip: reverse your signals to test the opposite idea.

Statistics

  • Wins by Martingale level, total profit and loss, and streaks.
  • Recent stats: wins in the last 3, 5, 10, 15, 25 and 30 trades.
  • Daily and monthly stats: win counts by weekday and by month.

How to use it

  1. Start a free trial on JSKAPPS and get access on TradingView.
  2. Add the connector lines to your strategy script and add both to your chart.
  3. Set payout and expiry to match your broker, then run the test.
  4. Compare your win rate with the break-even win rate for your payout (55.6% at an 80% payout), and stress-test with different payouts, expiries and sessions.

New to binary-options testing? Start with the free Strategy Tester (Basic), and read the binary option testing guide.

Examples

On the chart

From TradingView

What traders say

Read all comments
i love this pin script
@Leon300c on TradingView · Aug 2023

Related scripts

You might also use

Educational tool only, not investment advice. Statistics and backtests describe past data and do not predict future results.