Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 575
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
Good afternoon,
Is there any way to change the directory for writing/reading files from "Tester/Files" to "MQL/Files" when the Expert Advisor is working with these files during testing?
Good afternoon,
Is it possible to change the reading/writing directory from "Tester/Files" to "MQL/Files" when Expert Advisor uses these files during testing?
With MQL - no way, only through WinAPI.
Thank you for your reply!
How do I calculate the lot volume in increments? If deposit =1000, lot = 0.1, deposit became 2000 lot = 0.2. That is, if the deposit is 1500 or 1700, the lot does not increase.
Not with MQL tools, only with WinAPI.
Thanks for the answer!
In this case you'd better use the FILE_COMMON flag and the files will be available both from the tester and the terminal. Only problems may occur when testing on the network. But personally I haven't tested it.
Taras Slobodyanik:
Let's do the math:
Deposit = 1,700. Divided by 1,000 we get 1.7 and rounded to the nearest integer on top, we get 2.
Multiply by 0.1 and the result is not what you want.
Apparently it is better to take rounding to the nearest lower integer MathFloor
No, no, with a deposit of 1100, the lot will be 0.11, and I need the lot not to increase up to 2000. How to specify a step =1000 in settings?
I have corrected it.
Although the principle is there, and this is a nuance
Let's do the math:
Deposit = 1,700. Divided by 1,000 we get 1.7 and rounded to the nearest whole number on top, we get 2.
Multiply by 0.1 and the result is not what you want.
Apparently it's better to round to the nearest lower integer MathFloor
or instead of 1000, use 1999.99 )
1000 and 0.1 are external variables.
Thank you, I did so:
I hope I put_depo ofint type correctly.