Gamestudio Links
Zorro Links
Newest Posts
Few update suggestions
by 3run. 07/23/21 08:47
FXCM Login Error
by jcl. 07/22/21 08:25
New Zorro version 2.40.1
by dpn. 07/21/21 19:39
MT5 bridge plugin
by jcl. 07/21/21 15:52
FXCM - CFD Price can not be loaded
by jcl. 07/21/21 08:40
AUM Magazine
Latest Screens
Hecknex World
Scheherazade's Journey
Paradox Vector
The Space Between
Who's Online Now
1 registered members (NobbyG), 382 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ace_trader, chrissierra, fredperim, degenerate_762, TalonTrades
18664 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
BarOffset for per-bar oversampling #483486
06/04/21 16:39
06/04/21 16:39
Joined: Jul 2017
Posts: 564
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 564
How does Zorro change BarOffset when doing per-bar oversampling?

For,say, BarPeriod=60, what would BarOffsets be for NumSampleCycles=2, 3,4,6?

Also, is PRELOAD(and/or TESTNOW) flag needed?

Re: BarOffset for per-bar oversampling [Re: Zheka] #483487
06/05/21 06:46
06/05/21 06:46
Joined: Apr 2008
Posts: 363
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 363
Austria
I dont know the exact formula but the bar period is divided in equal parts and the offset starts with the highest so that the last cycle has offset zero. Preload and testnow have nothing to do with that.

Re: BarOffset for per-bar oversampling [Re: Zheka] #483488
06/05/21 13:55
06/05/21 13:55
Joined: Jul 2017
Posts: 564
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 564
Sorry, I am not completely clear. Can you pls give an example?

Say, for the following default set up:

BarZone=ET;
EndWeek = 51705;

BarOffset = 17*24; // so that the day ends at 17:00 ET.
BarPeriod= 1440;

what BarOffsets will be used by Zorro with NumSampleCycles = 4?

Since 'oversampling' makes bar resampling, then both PRELOAD and TESTNOW should have some influence on that - based on the description of these in the manual (and jcl's answer to my question: https://opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=483395#Post483395)..

Re: BarOffset for per-bar oversampling [Re: Zheka] #483490
06/06/21 06:38
06/06/21 06:38
Joined: Apr 2008
Posts: 363
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 363
Austria
17*24. 4 times.

Computers do what you tell them to do.

Re: BarOffset for per-bar oversampling [Re: Zheka] #483622
06/24/21 02:39
06/24/21 02:39
Joined: May 2021
Posts: 6
S
Sempervirens Offline
Newbie
Sempervirens  Offline
Newbie
S

Joined: May 2021
Posts: 6
Hello Zheka, did you had any success oversampling? I'm currently using zorro version 2.35.9 and adding NumSampleCycles = 4 seems to have no effect at all on my script, the backtest shows same exact results with or without oversampling and the time for testing seems to be exactly the same as well, I tried just adding the line into the Workshop 4 script and it didn't change the result or the time it took to test the script either, thinking I must be doing something wrong or maybe the function is broken? If you have managed to do per-bar oversampling in 2.35.9 please let me know, thanks!

Edit: also when clicking results and going thru the file Workshop4.txt I noticed that under "Cycle performance" It shows 0.00 0.00 0.00 0.00.

Edit: for anyone wondering the solution is to set up NumSampleCycles before the asset() call. Thanks Zheka.

Last edited by Sempervirens; 06/27/21 00:42.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1