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.
PaulParticipant
Master
I 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
if dayofweek=5[1] and hour[1]=22 then
skipmondayhourone=0
else
skipmondayhourone=1
endif
OPENDAYOFWEEK returns the day at the open of a candle and as the candle opens at 0000 that is technically midnight Sunday. Use DAYOFWEEK instead which returns the day at the close of the candle which will be Monday.
00: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!
This 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.
OpenDayOfWeek 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.
It cannot be correct to assign it OpenDayOfWeek=0 and IntraDayBarIndex=0.
Which one shall I trust?
Why 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.
How 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!
You don’t call it Sunday’s candle you call the open of the candle Sunday because it was midnight Sunday that it opened.