[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 360
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
https://www.mql5.com/ru/forum/101632 and here https://docs.mql4.com/ru/basis/variables/formal
Thank you
No, that's too much. What is more volatile from at least 20-50 pips
Guys, can you advise:
When testing the advisor on standard indicators included in MT4 delivery on currency pairs - no questions - everything works according to the trading algorithm.
When testing on metals, such as silver and gold, the orders are not opened, in the Strategy Tester Journal they write zero division.
I have the same input parameters, the history for this five-digit brokerage company (forex4yu) has been uploaded for the tested instruments.
What is the possible reason? I do not want to send my EA to a telepath. I wrote the Expert Advisor personally according to the version of the book.
Guys, can you advise:
When testing the advisor on standard indicators included in MT4 delivery on currency pairs - no issues - everything works according to the trading algorithm.
When testing on metals, such as silver and gold, the orders are not opened, in the Strategy Tester Journal they write zero division.
I have the same input parameters, the history for this five-digit brokerage company (forex4yu) has been uploaded for the tested instruments.
What is the possible reason? I do not want to send my EA to a telepath. I wrote the Expert Advisor personally according to the version of the book.
Guys, can you advise:
When testing the advisor on standard indicators included in MT4 delivery on currency pairs - no issues - everything works according to the trading algorithm.
When testing on metals, such as silver and gold, the orders are not opened, in the Strategy Tester Journal they write zero division.
I have the same input parameters, the history for this five-digit brokerage company (forex4yu) has been uploaded for the tested instruments.
What is the possible reason? I do not want to send my EA to a telepath. I wrote the Expert Advisor personally according to the version of the book.
You should see the code. In general, you can (in Notepad++) automatically mark all places where a division sign occurs in the code and see if division by zero actually occurs in some case.
I'd love to see the code. And in general, you can (in Notepad++) automatically mark all places where division sign appears in the code and check if in some case division by zero actually occurs.
Yes, I'm already looking at the prints where the unpacking has reached, everything is fine there...
In the function of volume normalisation for metals there was this error (division by zero), now it is not present, there was another 131 - incorrect volume, although set obviously = 0,01 lot, I look in general...
For currencies, this volume normalization function works correctly.... Maybe there is a common for them (for metals and currencies)?
I can't understand: it prints the top line, but the order doesn't open with error 131 - wrong volume, I've already set 0.1 and 0.01...
Whenever dividing by a variable, you must first check that it is not equal to zero.
Thanks, I'll keep that in mind in the future. It's just that this time I took a ready-made volume normalisation function.
No use so far... Writes the same error...
I opened a position for gold on my account in the tester with 10,000 and 0.01 and 0.1 lots - to no avail.
Perhaps someone had a similar issue? A tip, plz...
Add my lot checking function to your custom subroutines. And call it before each OrderSend(). Rounding in my dll is done by the laws of mathematics: If the rounded number ends in fractional part with number >=5, then rounded up. If <=4, then it's rounded down. As far as I understood programming languages have problems with this for some reason - I had to make my own dll-code. Basically, the code is very simple, but I searched the Internet quite a lot at my time, before I found the optimal solution. Do you need the source code of the dll?