Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, TipmyPip, RealSerious3D), 892 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Q re: tdm() and tom() #469104
11/05/17 14:39
11/05/17 14:39
Joined: Jan 2017
Posts: 9
M
Mook_Yon Offline OP
Newbie
Mook_Yon  Offline OP
Newbie
M

Joined: Jan 2017
Posts: 9
Hi,

Could anybody help on this little thing?
I expected that a [Test] with D1 data and BarPeriod = 1440a statement like this:
Quote:
if(tdm(0)==tom(0)) {code()}

would invoke code() every end of month. However, some months are skipped (e.g., in 2017, code() was NOT invoked on JAN, FEB, APR, and MAY... in earlier years, different months skipped).

Is there any explanation for that behavior?

BTW, data checked for Gaps.

THX!

Re: Q re: tdm() and tom() [Re: Mook_Yon] #469125
11/06/17 08:44
11/06/17 08:44
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
This happens due to gaps are in the data. When you check for gaps, you'll see that D1 data has usually many missing days due to holidays.

Holidays are not accounted for in tdm() and tom(), so the comparison tdm(0)==tom(0) will only work when no full days are missing, such as with M1 data of 24 hours traded assets. Otherwise you need to check the day of week for determining if you're at the end of the month.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1