Scripts: Determine Broker's Daylight (DST) schedule - page 2

 
Alain Verleyen #:

Yes, me neither, no DST_AU broker found.

Thanks for your detailed explanation and answers. I will use your GOLD idea, but not your code, and check it on all the brokers used by our customers, I will keep you posted in case there is something special. (Some brokers are sometimes doing very strange things).

This is the best solution I have found to my knowledge, any new ideas from you on this topic will be a great addition to this unexplored area.

 

Update 23 April 2024 - version 1.40

Modified the scanning method to use the current chart symbol. For this, the algorithm has to compare the times of the "last" H1 of the trading weeks.

 

Hello amrali,


I have tested your code and works great except for one broker which returns DST_NONE. It is a funded account called FundedNext (the account name starts with GrowthNext, but i dont know exactly if this is the broker name).

I have attached the debugger in AU, UK and US 'if statements' with the values of the lastBarWk and lastBarPrevWK so you can check


Thanks in advance!

Files:
au.png  88 kb
uk.png  109 kb
us.png  97 kb
 
Javi Losabe #:

Hello amrali,


I have tested your code and works great except for one broker which returns DST_NONE. It is a funded account called FundedNext (the account name starts with GrowthNext, but i dont know exactly if this is the broker name).

I have attached the debugger in AU, UK and US 'if statements' with the values of the lastBarWk and lastBarPrevWK so you can check


Thanks in advance!

Per the pics you sent, this broker is DST_NONE.

So, what is the correct/real DST setting on this server??

Please run this script on your broker and send me the output so I can check for a solution.

Files:
 

I send u both outputs:

I dont know what would be the correct DST setting, i though it should be one of the ones u provide in your initial script

Files:
a.png  50 kb
 
Javi Losabe #:

Hello amrali,


I have tested your code and works great except for one broker which returns DST_NONE. It is a funded account called FundedNext (the account name starts with GrowthNext, but i dont know exactly if this is the broker name).

I have attached the debugger in AU, UK and US 'if statements' with the values of the lastBarWk and lastBarPrevWK so you can check


Thanks in advance!

Then why do you think it is not working with your broker?

I also sent you a script to run to your broker to debug the problem, otherwise I cannot help you.
Files:
 

Sorry amrali,


I dont know if this works with this broker or not, sorry. I thought every broker must have a DST. On the other hand, Look at the picture i am attaching to this post (this is from the broker webpage), so i can asume that they are using some DST, right?


PD: In the a.png file i have sent in the last post, u can see the output of your week_times.mq5 file, sorry for the misunderstanding

Files:
dst.png  68 kb
 
Javi Losabe #:

Sorry amrali,


I dont know if this works with this broker or not, sorry. I thought every broker must have a DST. On the other hand, Look at the picture i am attaching to this post (this is from the broker webpage), so i can asume that they are using some DST, right?


PD: In the a.png file i have sent in the last post, u can see the output of your week_times.mq5 file, sorry for the misunderstanding

Could please run the script starting from older date like Jan 2022.
 

Sure!

Files:
 
amrali #:
Could please run the script starting from older date like Jan 2022.
Seems the worst case scenario " Some brokers are sometimes doing very strange things ". They changed their GMT and DST policy apparently.