Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,089 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Question about how zorro backtest handles closing trades #457501
01/20/16 01:33
01/20/16 01:33
Joined: Apr 2015
Posts: 26
T
trader6363 Offline OP
Newbie
trader6363  Offline OP
Newbie
T

Joined: Apr 2015
Posts: 26
Here is a hypothetical scenario:
I enter a trade at 1.00000 with a stop loss and take profit of 0.5 pips on a close of a 1 minute bar. The next 1 minute bar has a high of 1.00008 and a low of 0.99992 with a close of 1.00003. In this scenario the price has clearly moved over 0.5 pips in both directions from the entry price but since we dont have data within the minute we dont know which came first and it could be either a winning or a loosing trade. How does zorro backtest handle this?? Does it ignore high and low and just use close for closing the trade?
For the purpose of hypothetical scenario assume spread is 0.

Re: Question about how zorro backtest handles closing trades [Re: trader6363] #457511
01/20/16 13:02
01/20/16 13:02
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Zorro will here hit the stop first, since it assumes the low comes before the high. It would be different when the close was below the open - then it assumes the high before the low. When both targets are hit in the same tick, the stop is hit first.

Re: Question about how zorro backtest handles closing trades [Re: jcl] #457513
01/20/16 13:42
01/20/16 13:42
Joined: Apr 2015
Posts: 26
T
trader6363 Offline OP
Newbie
trader6363  Offline OP
Newbie
T

Joined: Apr 2015
Posts: 26
I see. Just to clarify, zorro assumes that when close is below open, it is more likely that the high was reached before the low? Logically it makes sense. However, is this assumption supported by statistical data and do you have any numbers?
Also as a suggestion, perhaps there could be a way to report in a log how many trades encountered this scenario during back-testing as it could potentially greatly affect the outcome of a backtest.
Thx

Re: Question about how zorro backtest handles closing trades [Re: trader6363] #457515
01/20/16 16:58
01/20/16 16:58
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes, there was a statistical test, but I don't have the numbers anymore. It was many years ago in the first stages of Zorro.

ALL trades with any stop or profit limit encounter that scenario. The exit price must be always determined from the exit candle by some algorithm.

Re: Question about how zorro backtest handles closing trades [Re: jcl] #457518
01/20/16 18:06
01/20/16 18:06
Joined: Apr 2015
Posts: 26
T
trader6363 Offline OP
Newbie
trader6363  Offline OP
Newbie
T

Joined: Apr 2015
Posts: 26
I understand and I agree with the algorithm logic. I wish there was a way to tell how many times a scenario I mentioned above was encountered as that may affect the validity of the backtest when stop loss and take profit are set too low.
Thanks for clarifying.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1