Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by M_D. 04/26/24 20:22
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (M_D, AndrewAMD, Quad, Ayumi), 806 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 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