For years, the commands “Dhigh, Dclose, etc.” ALWAYS ended at 1:00 AM. Recently, the day has been ending at 6:00 AM. Regardless of the timeframe, I’ve also tried MTF. Many people use these commands in their strategies. They work with them. Logically, the strategies are also designed for these end times. How can I avoid this error, or can I reverse it?
JSParticipant
Senior
I hope this is still collateral damage from IG’s EPIC migration because 06:00 am indeed makes no sense…
You can always create your own DClose:
once todayOpen=open
once todayHigh=high
once todayLow=low
once todayClose=close
once Dailyclose=todayClose
once DailyOpen=todayopen
once DailyHigh=todayHigh
once DailyLow=todayLow
checkTime=010000
if opentime>=checktime and opentime[1]<checktime then
Dailyclose=todayClose
DailyOpen=todayopen
DailyHigh=todayHigh
DailyLow=todayLow
todayOpen=open
todayHigh=high
todayLow=low
todayClose=close
else
todayHigh=max(high,todayHigh)
todayLow=min(low,todayLow)
todayClose=close
endif
return dailyClose as "Dclose", dailyHigh as "DHigh", dailyLow as "Dlow", dailyOpen as "Dopen"
Thanks, Ivan… What’s wrong with this option?
if time = 010000 then
myclose = close
myhigh = highest[24](high)
endif
Yes, your code is fine, but only if you are on an hourly timeframe and there are always 24 bars in a day.
If there’s a holiday or shorter trading session with fewer bars, then it will give you a problem.
@Nicolas Is there an update on the problem?
I want to draw attention to this issue again… the H4 candles end at the wrong time, on 2, 6, 10, etc., instead of 1, 5, 9, etc., and the trading day also ends at the wrong time. Is there a solution or someone working on this?
I think the reason is the wrong time zone. When I started the new DAX contract, the time zone initially was set to UTC+1:00 (London time). Set it to UTC+2:00 (Berlin time) and the H4 candles will start at 9, 13, 17 o’clock.
Thanks for the tip. On my platform, the box at the top is checked… my computer’s time zone, which is Berlin time. It was like that before, and I haven’t changed anything. Can you test the SP500 and NASDAQ on your platform?
In both markets, H4 candles start at 0, 4, 8, 12 o’clock (local time New York). I don’t know what this was like before.
For American markets, it is always better to use the local time zone there (US Eastern time), because then you avoid the time shift between summer and winter time between US and Europe during 4 weeks of the year. I once suggested this to PRT and then they introduced this button “use different time zones for different markets”. This way, you always get the correct New York time in US charts. Markets then open always at 9:30 and close at 16:00.
Can you help me with this :
I understand the time shift in daylight savings. Until now I cover for that in the autotrading code. Clumsy but not a big deal.
Now let’s assume that from now on we work with the New York time. What would I see in my charts ? Would that be 05:45 instead of 11:45 which latter is the AMST time at this moment ? And thus I would build in checks in the program code that don’t trade around US opening hence 15:30 our time (14:30 with the daylight savings time shifted), which now is going to be 09:30 always ?
If that answer is Yes Indeed, then the least (and immediately worst) what will happen is that no program code will be compatible between IG and IB.
?
Edit : when this is clear to me, I think I can tell what happened for changes … (after talking about it extensively with PRT).
Yes, 11:45 Amsterdam time is then 5:45 New York time. Except for the 4 weeks when US has summer time and Europe winter time, or vice versa.
But NASDAQ or S&P then open always at 9:30 when you use US Eastern as time zone for US markets, irrespective of summer or winter time.
then the least (and immediately worst) what will happen is that no program code will be compatible between IG and IB
Why ? When you trade American futures at IB, they should trade at the American exchanges using US Eastern Time as time zone, and European futures trade at EUREX, using Frankfurt time as time zone ?
Same for US index CFDs or European index CFDs at IG.
Or is it Chicago time for US futures ? Then just subtract 1 hour or use Chicago time at IG, too.