Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (dBc, clonman, TipmyPip), 18,816 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
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