TradingView
tanayroy
1. Jul. 2023 10:11

Binary Option Strategy Tester with Martingale-Basic V.2 

Euro Fx/U.S. DollarFXCM

Beschreibung

In Binary options, strategy testing is a bit different. The strategy result depends upon expiry intervals and payout ratio.
My previous script was a try to resolve this but has some bugs in specific choices. The new version overcame those and added some new features useful for binary option strategy testing.
Assumption:
  • We are opening position at next candle after signal come
  • Chart interval is option expiry time.
  • We are taking the position at opening price
  • Our call will be profitable if we get a green candle and put will be profitable if we get a red candle
  • We can open only one trade at a time. So if we are in trade, subsequent signals will be ignored.


All Input Options:
  • Test Call/Put individually or both. Default BOTH
  • Select up to 5 Martingale levels. Default 2
  • Type of Martingale Trade. Default “SAME”
    “SAME”: If you are trading CALL and incur a loss, you are taking CALL in subsequent Martingale levels.
    “OPSITE”: if you are trading CALL and incur a loss, you are taking PUT in subsequent Martingale levels.
    “FOLLOW CANDLE COLOR”: You are following candle color in Martingale levels, i.e if the loss candle is RED, you are taking PUT in subsequent candles.
    “OPPOSITE CANDLE COLOR”: You are taking opposite candle color trade, i.e if the loss candle is RED, you are taking CALL in subsequent candle.
  • Select Specific Trading Session. Please select “USE SPECIFIC SESSION”. Default: TRUE
  • Put the investment amount per option. Default: 10
  • Payout ratio. Default: 80%


The strategy is taken from Vdub Binary Options SniperVX v1 (by @vdubus). I have deleted extra parts and kept only the necessary parts.

Result Table

Signal and Win Levels:

Signal and Loss:


Please note that Binary options trading is very risky. You must be aware of the risk and be willing to accept them in order to invest in binary options. Only invest what you can afford to lose. The past performance of any trading system, strategy, or methodology is not necessarily indicative of future results.

Versionshinweise

The strategy tester works well with Binary option traded in IQ Option or other similar Platform.

Versionshinweise

Updated the comment area in code, where you can paste your strategy for testing. Please paste your logic in that area only with is_call and is_put variable. Assign buy logic in is_call and sell logic in is_put. Please keep the rest code intact to view result.
Kommentare
shetns17
Can u make video of live trading
Leon300c
hi.if we are trading, subsequent signals will be ignored. can you fix the script? as we are in the trade, so that the next signal will show how the current martingale will end. Thank you. I hope you understand me
tanayroy
@Leon300c, The script logic is if you get a signal in your strategy and you apply martingale, you are taking consecutive trade not as per your signal but type of trade, i.e
“SAME”: If you are trading CALL and incur a loss, you are taking CALL in subsequent Martingale levels.
“OPPOSITE”: if you are trading CALL and incur a loss, you are taking PUT in subsequent Martingale levels.
“FOLLOW CANDLE COLOR”: You are following candle color in Martingale levels, i.e if the loss candle is RED, you are taking PUT in subsequent candles.
“OPPOSITE CANDLE COLOR”: You are taking opposite candle color trade, i.e if the loss candle is RED, you are taking CALL in subsequent candle.
So, when signal triggered and we take our first trade and incur a loss, we are applying Martingale as per above logic to win the trade in subsequent candles.
We are not waiting for next signal for applying Martingale.
Whatever you are asking is strategy level Martingale and this basic version is not able to handle this.
Mehr