I AM COMLETELY SURE MY PLATFORM SETTINGS IS SET TO TRADE THE MARKET’S LOCAL TIME.
HOWEVER IT IS TRADING OUTSIDE THESE HOURS.
COULD THE PROBLEM BE WITH THE BROKER?
IG MARKETS?
Post a screenshot of your Platform time settings and we may be able to help.
At my attached settings, US Indices trade 24/5 (with IG) unless I put time constraints in my Algo code.
Attached settings and code.
I want it to trade S&P 500 whwn the market is open in USA, but it trades outside of these hours
When you started your Algo running on ProOrder on US500 were your settings as you show in your screenshot?
Note, what you want won’t work if:
Algo is started under UTC+2 (your timezone) and then (after starting Algo) Platform settings are changed to UTC+4 (USA timezone).
You can easily achieve what you want by running on your local timezone UTC+2 but changing your times:
Defparam Flatbefore = 153000 //UTC+2
Defparam FlatAfter = 220000 //UTC+2
Above is what I do to achieve same as what you want (but for me it is 143000 and 210000 as I am UTC+1 currently)
Btw in your screenshot, you show your time settings as DefparamFlatBefore i.e. NO space (there needs to be a space) … maybe the ‘no space’ is causing your problem anyway??