You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Can you advise how to solve the problem?
The created file is stored in directory: tester\Agent\MQL5\FilesAfter the first run of the Expert Advisor in the tester (Read=false), a csv file with statistics is created.
In int OnInit() the following code:
However, at second run (Read=true). We need to read data from this file, but the file is deleted.
Can you advise how to solve the problem?
The created file is stored in directory: tester\Agent\MQL5\FilesAfter the first run of the Expert Advisor in the tester (Read=false), a csv file with statistics is created.
In int OnInit() the following code:
However, at second run (Read=true). We need to read data from this file, but the file is deleted.
In this case you need to create a file with the flag FILE_COMMON. The file will be created in the terminal's shared folder.
Got it figured out.
Check out ChartIndicatorAdd
Servicedesk, is application #359447 being groped or have you tried for nothing?
If we assume that this is the indicator), the first time the date will be displayed, but the next settings on the chart (second, third copy) will not display the date.
If we assume this is the indicator), it will display the date for the first time, but the next settings in the chart (second, third copy) will not display the date.
Now the calculation part of the indicator is deleted from mql space with a delay.
if you apply the same indicator (with the same parameters) to different (but the same symbol/timeline) charts - there will be no re-initialization.
If after deleting last copy go for a smoke - then there will be reinitialization at startup.
Such side effect of optimization. :)
Note: Smoking is bad for YOUR HEALTH !
;)
Dear programmers,
Tell me, what in the mql5 program code affects the speed most of all? The matter is that while creating my own program and increasing the code volume, I have faced the fact that its speed has decreased significantly. Although, the more code-intensive standard Expert Advisors from the Advisors and Examples folder are much faster.
In general, is there an article or explanation of how to better format the code structure on the forum? Give a piece of advice to a novice programmer. Thank you!
Dear programmers,
Tell me, what in the mql5 program code affects the speed most of all? The matter is that while creating my own program and increasing the code volume, I have faced the fact that its speed has decreased significantly. Although, the more code-intensive standard Expert Advisors from the Advisors and Examples folder are much faster.
In general, is there an article or explanation of how to better format the code structure on the forum? Give a piece of advice to a novice programmer. Thanks!
IMHO, nested loops affect speed the most. Nested loops up to the third depth is practically a limit, beyond which you have to be very careful about the size of the loops. I'll take my P4 for example: it's running at 3Hz, I'm getting ~10k operations per second.
This number means, that triple nested cycles 1000x1000x10 will be executed in 1 sec, if you understand, if the 3rd cycle is increased to 100 you get 10 sec.