Gamestudio Links
Zorro Links
Newest Posts
nba2king Latest Roster Update Breakdown
by joenxxx. 10/14/25 06:06
Help!
by VoroneTZ. 10/14/25 05:04
Zorro 2.70
by jcl. 10/13/25 09:01
ZorroGPT
by TipmyPip. 10/12/25 13:58
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 10/11/25 18:45
Reality Check results on my strategy
by dBc. 10/11/25 06:15
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 9,184 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
joenxxx, Jota, krishna, DrissB, James168
19170 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
price() need to be called at least once()? #487875
10/22/23 22:58
10/22/23 22:58
Joined: May 2023
Posts: 4
T
tickserver Offline OP
Guest
tickserver  Offline OP
Guest
T

Joined: May 2023
Posts: 4
I use a binary options strategy with 1h-candels and TimeFrame=2.
Because of broker restrictions I want to exclude trades [18:00-22:00[
The following code snippets do the exclusion correctly.
With the code block 1) in my strategy I get different results in backtesting than with 2)

1)
Code
vars Price = series(price());
int h = hour(0);
if (h>18 && h<22) return;


2) (quite different results:)
Code
int h = hour(0);
if (h>18 && h<22) return;
vars Price = series(price());


Why?

Last edited by tickserver; 10/24/23 22:41.
Re: price() need to be called at least once()? [Re: tickserver] #487891
10/24/23 22:43
10/24/23 22:43
Joined: May 2023
Posts: 4
T
tickserver Offline OP
Guest
tickserver  Offline OP
Guest
T

Joined: May 2023
Posts: 4
Found some explanation in Zorro-help regarding "series()"

"Therefore series calls cannot be skipped by if or other conditions that change from bar to bar (see example below)."
I do not understand the explanation but this must be the reason.

Thread closed.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1