Why are you using current? That will always be correct. It's purpose is to get other symbols/TFs.
Correct.
Had to go to my sources. Originally had HR2400 86400. Changed it sometime to the above which broke it. Equal precedence, left to right: dt % PERIOD_D1 * 60 not equal to dt % (PERIOD_D1 * 60).
Wouldn't have been a problem if you had used the corrected version which doesn't use TimeOfDay(). Try this:
I still don't get it. Please advice. Lets say I just want to plot a vertical line at 12:00 on a current chart for current timeframe using indicator.
I need to download chart history first for the current period to be sure the vertical line will be plotted at 12:00, when I e.g. is manually changing chart symbol. Where should I put this ObjectCreate function? Any code changes should be done?
That's right. In case of PERIOD_CURRENT this method always returns true, even if chart did download some history. How to determine the finish of history downloading on PERIOD_CURRENT?
Has anyone noticed any changes in the MT4 automatic validation process for Expert Advisors?
I’m experiencing an issue where using basic conditions like iHigh , Bars , or iBars results in a "no trading operations" error during validation. However, if I introduce a time-based condition (e.g., buying/selling in the first minute of each hour), the validation passes.
All OrderChecks functions are properly implemented.
Risk and Order Management logic is the same for booth.
The same EA passes MT5 validation without any issues.
Could this be related to how historical data is handled during the MT4 validation process? Has anyone else encountered this?
Why are you using current? That will always be correct. It's purpose is to get other symbols/TFs.
I still don't get it. Please advice. Lets say I just want to plot a vertical line at 12:00 on a current chart for current timeframe using indicator.
I need to download chart history first for the current period to be sure the vertical line will be plotted at 12:00, when I e.g. is manually changing chart symbol. Where should I put this ObjectCreate function? Any code changes should be done?
William Roeder #:
That will always be correct.
That's right. In case of PERIOD_CURRENT this method always returns true, even if chart did download some history. How to determine the finish of history downloading on PERIOD_CURRENT?
Has anyone noticed any changes in the MT4 automatic validation process for Expert Advisors?
I’m experiencing an issue where using basic conditions like iHigh , Bars , or iBars results in a "no trading operations" error during validation. However, if I introduce a time-based condition (e.g., buying/selling in the first minute of each hour), the validation passes.
Could this be related to how historical data is handled during the MT4 validation process? Has anyone else encountered this?