So I have an EA that runs at 7am every day and gets the highest and lowest open/close times in the last 12 hours. However, it's not working properly and instead runs the code for the last 36+ hours (I can't identify exactly how many hours but it definitely isn't 12!)
Any ideas?
Here's my code:
When calling SessionHigh or SessionLow I'd expect the script to get the highest and lowest open/close in the last 12 hours but it isn't. It's running at 7am but the returned values aren't correct.
Read the MQL5 help and do not confuse variables in places:
int ArrayMinimum( const void& array[], // array for search int start=0, // index to start checking with int count=WHOLE_ARRAY // number of checked elements );
int ArrayMaximum( const void& array[], // array for search int start=0, // index to start checking with int count=WHOLE_ARRAY // number of checked elements );
|
- www.mql5.com
Read the MQL5 help and do not confuse variables in places:
I have read the documentation, and the code is correct but still not working. Could it be a weekend issue?
Code has been done in MQL4 - https://docs.mql4.com/array/arrayminimum
- docs.mql4.com
I have read the documentation, and the code is correct but still not working. Could it be a weekend issue?
Code has been done in MQL4 - https://docs.mql4.com/array/arrayminimum
You are on the MQL5 forum. You write in the main section - that's why you get answers in MQL5. If you are using an old terminal, write only in a special section: MQL4 and MetaTrader 4 .
I'll postpone your topic.
You are on the MQL5 forum. You write in the main section - that's why you get answers in MQL5. If you are using an old terminal, write only in a special section: MQL4 and MetaTrader 4 .
I'll postpone your topic.
Thank you - apologies.
Any ideas anyone?
I have the EA running simultaneously on 4 different charts and it's returning different values for SessionLow and SessionHigh times??
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
So I have an EA that runs at 7am every day and gets the highest and lowest open/close times in the last 12 hours. However, it's not working properly and instead runs the code for the last 36+ hours (I can't identify exactly how many hours but it definitely isn't 12!)
Any ideas?
Here's my code:
When calling SessionHigh or SessionLow I'd expect the script to get the highest and lowest open/close in the last 12 hours but it isn't. It's running at 7am but the returned values aren't correct.