OpenDayOfWeek monday sunday data buggy ?
Forums › ProRealTime English forum › ProBuilder support › OpenDayOfWeek monday sunday data buggy ?
- This topic has 9 replies, 4 voices, and was last updated 4 years ago by Vonasi.
-
-
11/09/2019 at 5:28 PM #112477
Hello,
With IG DAX 30 cash 1€, first hour monday data are interpreted as sunday data by PRT as indicated by the OpenDayOfWeek function (= 0)
This means that lots of computation are faulty. For example a simple 2-day moving average will return a bad value on monday since it uses monday and sunday instead of monday and friday
When i checked with IG web platform, it’s ok, there’s no sunday data and the simple 2-day moving average is working fine.
I tried changing timezones without success. Is it an already opened bug ?
platform used : IG Sponsored PRT v10.3
example : DAX 30 H1 + friday november 1th, sunday november 3th, monday november 4th. Just check OpenDayOfWeek value to see the problem.
02/25/2020 at 3:36 PM #120466I had the same problem.
A trade must be opened after the 4th hour on stop.
But simply using hour > 4 doesn’t work on the first hour on monday.
To prevent this I tried dayofweek>0 or >=1, time<>000000, intradaybarindex>=1 etc. to no avail.
so I settled for this
12345if dayofweek=5[1] and hour[1]=22 thenskipmondayhourone=0elseskipmondayhourone=1endif02/25/2020 at 3:59 PM #12047202/25/2020 at 5:13 PM #12048300:00:00 is the new day worldwide and the label on the chart clearly shows it, but PRT consider it both ways, say 1h TF:
- the tag on the charts reads Monday (new day)
- IntraDayBarIndex is 0 (Monday, new day)
- OpenDayOfWeek returns 0 (sunday, previous day)
OpenDayOfWeek is obviously incorrect!
02/25/2020 at 5:17 PM #120485This can be due to IG closing the day at 01:00:00 Utc+, still it is not correct to assign that same bar different interpretations according to what you look to read it.
02/25/2020 at 5:18 PM #120486OpenDayOfWeek is obviously incorrect!
I don’t think that it is incorrect. If we think that our open time is actually the same as our close time of the previous candle or segment of time where a candle could be created then our previous candle closed at midnight Sunday and so we have to say that the next one opened at midnight Sunday.
02/25/2020 at 5:21 PM #120487It cannot be correct to assign it OpenDayOfWeek=0 and IntraDayBarIndex=0.
Which one shall I trust?
02/25/2020 at 5:25 PM #120488Why not? The IntradayBarIndex is just a daily candle count starting at zero it is not associated with the open or the close – it is just saying here is the first candle of the day! The open has to be given a time and day and it is given the same time and day as the close of the previous candle. Seems logical to me.
02/25/2020 at 6:33 PM #120494How can it be the first candle of the day (monday) if you call it sunday’s candle?
Anyway, after struggling with this many times I have worked it around, so I hope they don’t change it!
02/25/2020 at 7:24 PM #120499 -
AuthorPosts
Find exclusive trading pro-tools on