![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I've found a variant of the code here.
how it can be inserted into my EA????????????
The strange thing is going on with the Expert Advisor now. it's not working with the position closures. there may be several positions of the same type open and active at the same time. And the result: everything is losing on the same problem, though in a modified version!
Fixed it, try it.
Hello.
When programming a neural network, I encountered the following problem.
I have an array:
When I test it, I get 0 instead of 4. The same thing is in a two-dimensional array, what should I do?
And taking the opportunity to ask a second question: as I understand mql4, you can not set a specific range for assigning a variable to random numbers?
In Delphi it looks like this
Randomize;
i:=Random(10); // the same range from 0 to 10
..I have an array:
When testing, I get 0 instead of 4. The same thing happens in a two-dimensional array, what do I do?
The array is simple, you defined dimension [3] and you call the fourth missing cell.
Write double X[4]; and everything will work.
With an array it's simple, you've defined dimension [3], but you're calling the fourth, missing cell.
Write double X[4]; and everything will work.
Thanks, I'll try it, but what about random ?
And if there is a two-dimensional array, a 4 by 9 matrix and each element is assigned a value of 0.1, would that be about right?
And if you have a two-dimensional array, a matrix of 4 by 9, and assign value 0.1 to each element, it will be like this?
It should work. If you don't feel lazy and display the whole matrix line by line in the comment, you'll see the result.
By the way, you can make the comment a function and use it to check the contents of the array.
And about the randomness, I'll pass. I was just passing by and saw the mistake. :))
Thanks, I'll give it a try, but what about random?
And if there is a two-dimensional array, a 4-by-9 matrix and each element is assigned a value of 0.1, would it be something like this?
Can be used
And if you have a two-dimensional array, a 4-by-9 matrix and assign a value of 0.1 to each element, would it work like this?
It would work, but it should be written like this: