Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 642 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Strange behavior with static variables [Re: debs] #469199
11/08/17 07:31
11/08/17 07:31
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
We'll look into that. Possibly StartWeek does not affect the day functions and Sunday is always included. We`ll provide a solution.

Re: Strange behavior with static variables [Re: jcl] #469207
11/08/17 13:08
11/08/17 13:08
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Ok, I learned that StartWeek has indeed no effect here, and Sunday is included. Since this is undesired, we will change this in the next update, but until then you can skip Sunday in this way:

int Offs = ifelse(dow() == MONDAY,3,1);
Lowx=dayLow(UTC,Offs);
Highx=dayHigh(UTC,Offs);

Re: Strange behavior with static variables [Re: jcl] #469208
11/08/17 14:18
11/08/17 14:18
Joined: Oct 2017
Posts: 9
D
debs Offline
Newbie
debs  Offline
Newbie
D

Joined: Oct 2017
Posts: 9
Thank you very much for this workaround! it would take me a lot of time to figure out in this way... but still there is something strange smirk look to screenshot:



Same script with your workaround with dates :
StartDate = 20170505;
EndDate = 20170518;

Last edited by debs; 11/08/17 14:52.
Re: Strange behavior with static variables [Re: debs] #469221
11/08/17 17:18
11/08/17 17:18
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Looks ok to me. Don't forget: It is not the high/low of the day, it is the high/low within the defined market hours.

You can check the prices in the log when you set Verbose to 2. You see then the OHLC prices of any bar and can compare. If you find something wrong, just post the part of the log here.

Re: Strange behavior with static variables [Re: jcl] #469222
11/08/17 19:00
11/08/17 19:00
Joined: Oct 2017
Posts: 9
D
debs Offline
Newbie
debs  Offline
Newbie
D

Joined: Oct 2017
Posts: 9
Ah of course, beginner mistakes ... laugh thank you many times!

Page 2 of 2 1 2

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1