Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Quad, AndrewAMD, Imhotep, TipmyPip, Edgar_Herrera), 809 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
LookBack and StartBar #476241
02/07/19 07:44
02/07/19 07:44
Joined: Nov 2018
Posts: 55
G
gamadeus Offline OP
Junior Member
gamadeus  Offline OP
Junior Member
G

Joined: Nov 2018
Posts: 55
I am a bit puzzled about how Lookback and simulation Periods work.
Im using the following testscript:

function run()
{

StartDate = 20180104;
EndDate = 20180104;
BarPeriod = 60;
LookBack = 0;

if(!is(INITRUN) && !is(LOOKBACK)) printf("n%02i-%02i-%02i %04i",year(),month(),day(),tod());

}

What is strange about it, is that first timestamp printed is 2am, not 1am as expected.
However, when I change Lookback to any non zero value it prints at 1am as it is supposed to.

What is going on here?
Its not really a big issue, I would just like to understand Zorros idiosyncrasies.

Re: LookBack and StartBar [Re: gamadeus] #476242
02/07/19 07:57
02/07/19 07:57
Joined: Nov 2018
Posts: 55
G
gamadeus Offline OP
Junior Member
gamadeus  Offline OP
Junior Member
G

Joined: Nov 2018
Posts: 55
Printing the Bar number somwhat explains my question but leads to another question.
Without Lookback the bar that ends at 2am is 1, which is the first period that can be printed.

However any Lookback up to 7 shifts Bar by 46, i.e. the 2am Bar is 47 now. Incremental increases thereafter seem to shift Bar in non linear fashion (didnt try to figure out the pattern).

So my question now is, what the heck is Lookback doing here? I thought that integer is the number of bars prior to StartBar, which clearly is not the case here.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1