Issue with binary options testing

Posted By: Nem

Issue with binary options testing - 11/08/16 17:14

Hi!

I'm quite new to Zorro, and I like your approach to trading very much. Congratulations for this great piece of software!
I'm mostly interested in binary options strategies, and, having got a kick-start from this article by the "Financial Hacker", I started to play around with the script there reported, and noticed an important fact to be taken into account in Zorro when simulating binary options strategies.
Referring to the script on the given link, when selecting a LifeTime much higher than 1 bar, and allowing placing positions when other positions are already open - by, for example, removing the line "if(NumOpenLong+NumOpenShort == 0)" - you may notice that something odd is going on. You may get incredible (but unfortunately wrong...) results, that being due to the fact that by default Zorro closes a trade when another trade on the opposite direction is placed, assigning it a win or a loss depending on the situation at the moment (thus without taking into account the expiry time fixed by LifeTime - or ExitTime). I think this is a "bug", in the sense that Zorro should not behave like that when the the BINARY flag is set. I 'solved' the problem setting Hedge to 2, which allows to enter and open long and short positions simultaneously.
Maybe this setting of Hedge to 2 should be executed automatically by the program when the BINARY flag is set, in order to avoid wrong simulation outcomes and too-good-to-be-true looking equity curves like the one in attachment... wink

Best,
Nem


Description: To-good-to-be-true
Attached picture BO_Shannon_EURUSD.png
Posted By: jcl

Re: Issue with binary options testing - 11/09/16 14:11

Yes. Hedging was prevented in the original script by not opening a trade when another one was still open, but when extending the life time of a trade, you must disable hedging explicitely. The same goes for other settings, for instance you must explicitely set the payout and reset spread and commission for any asset when you binary trade a portfolio - that was an issue in another thread here.

Zorro does not do those things automatically. The binary mode was added as an afterthought and is no native trade mode, so you must be careful to avoid contradicting settings.
© 2024 lite-C Forums