Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
4 registered members (AndrewAMD, fogman, Grant, juanex), 972 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
StartWeek/ EndWeek #470261
01/05/18 14:44
01/05/18 14:44
Joined: Jul 2017
Posts: 781
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 781
Hi JCL,

I cannot make sense of how StartWeek/EndWeek work. The following code generates strange results (See attached).
Quote:
function run()
{
BarPeriod = 1;

StartWeek=72117; EndWeek = 52100;

Weekend=3;

}

1) In both cases, the last bar of the week is 20:59. Why?
2) In both cases, the week does not start from 21:17. Why?
3) On 16/12/02-04, there is a "Weekend bar" (appearing as Sun, 22:00) - which has the start on Fri,20:59 and ends on Fri,22:00...With Weekend>=2 such bar should not have been created.

Please help.

Attached Files
Re: StartWeek/ EndWeek [Re: Zheka] #470272
01/06/18 08:34
01/06/18 08:34
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
Startweek/endweek only determine which bars are merged, and when you can trade. A weekend bar cannot end friday 22:00, but it can have the price of friday 22:00 when that was still the latest price.

Re: StartWeek/ EndWeek [Re: jcl] #470277
01/06/18 11:50
01/06/18 11:50
Joined: Jul 2017
Posts: 781
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 781

I am trying to understand how these work, and if they work as expected.
Quote:
A weekend bar cannot end friday 22:00, but it can have the price of friday 22:00 when that was still the latest price.
It should not have been created at all, according to the manual, with Weekend>=2.

Please let's also clarify the first 2 questions.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1