Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 457

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 don't understand any of this. My question was moved by the moderator from MKL5 to MKL4. Followed the link - yes, my question is hanging there, but the last answer is 5.02.2018. Came here - also MKL4 and life is boiling...So why is the moderator throwing in a dead thread? Alright, let's move on. Now to the point: throwing my "problem" over here.
For condition 1, put the magic number ID +1, for condition 2 magic number +2 and so on. That way you can then understand that this position was opened by condition 1 or by condition 2 ...
Afternoon. I have only succeeded for one position BAY. The magik set for sell does not work for some reason. Everything is absolutely identical, except for the magician of course. What have I done wrong?
I don't understand any of this. My question was moved by the moderator from MKL5 to MKL4. Followed the link - yes, my question is hanging there, but the last answer is 5.02.2018. Came here - also MKL4 and life is boiling...So why is the moderator throwing in a dead thread? Alright, let's move on. Now to the point: throwing my "problem" over here.
Afternoon. It only worked for one position BAY. The magik set up for SELL doesn't work for some reason. All is absolutely identical, except for the magician itself of course. What did I do wrong?
1. it does not know mql4.
2. To close an order with magic 222 it should be opened with magic 222 first. Look at which wizard opens SELL orders
3. After the OrderMagicNumber, there should be brackets ().
4. Why is the highlighted in the condition?
Guys, here's a question - how do I put variable values into a one-dimensional array?
Don't send it to help - there is NO example there for such a problem.
Let's say there is a variable a, which changes under certain conditions.
I want an array to store the last 3 values of this variable. How this is implemented in mql4?
I'm writing int mas[3];
mas[]=a; inside the loop, after a condition that changes a,
The compiler gives out ']', but nothing works, although logically it should. - It wants me to put some unknown expression into mas[]=a inside the parentheses.
Does MQL4 have any function that fills the array with a variable value at each loop iteration?
Guys, here's a question - how do I put a variable value into a one-dimensional array?
Don't send it to help - there is NO example there for such a problem.
Let's say there is a variable a, which changes under certain conditions.
I want an array to store the last 3 values of this variable. How this is implemented in mql4?
I'm writing int mas[3];
mas[]=a; inside the loop, after a condition that changes a,
The compiler gives out ']', but nothing works, although logically it should. - expression expected, it wants me to put some unknown expression inside of brackets in mas[]=a.
Does MQL4 have any function that fills the array with a variable value at each iteration of the loop?
Which cell of the array do you think the value of variable 'a' is placed in, like this: mas[]=a; ?
I'd send you to the help, read from the beginning :)
Guys, here's a question - how do I put variable values into a one-dimensional array?
Don't send it to help - there is NO example for such a problem.
Let's say there is a variable a, which changes under certain conditions.
I want an array to store the last 3 values of this variable. How this is implemented in mql4?
I'm writing int mas[3];
mas[]=a; inside the loop, after a condition that changes a,
The compiler gives out ']', but nothing works, although logically it should. - It wants me to put some unknown expression inside of brackets in mas[]=a.
Does MQL4 have any function that fills the array with a variable value at each loop iteration?
Maybe, you should read not only the code samples, but some other letters as well.
Here is a quote from the documentation:
Group of functions for working with arrays
No more than four-dimensional arrays are allowed. Each dimension is indexed from 0 to dimension_size-1. In a particular case of a one-dimensional array of 50 elements, calling the first element is array[0], the last one is array[49].
1. he does not know mql4.
2. To close an order with magic 222 it must first be opened with magic 222. Look at which wizard opens SELL orders
3. After the OrderMagicNumber, there should be brackets ().
4. Why is it marked in the condition?
Thank you for your reply. It's clear that I need to open with a magik first. I've removed the orderticket and checked the logic with comments. It turned out that the closing of positions is done according to the conditions of the first open position. That is, if first you open a Buy or Sell position with Condition 1 and then a second position opened with the same condition but with Condition 2, the closing condition is ignored and the second position is also closed with Condition 1 despite the other Magic.
I applied break after the order has been closed but the solution has been half-hearted:only if one position of the same type is opened. If, for instance, a Sell position has been opened first and has not yet been closed yet, while a Buy position is being opened and closed, the Sell position does not see any conditions to be closed until another Sell position is opened and closed (in accordance with its conditions). And if BAY opens and closes again, it again misses its closing conditions. So what to do?
Hi guys. Can you tell me how to get rid of the [Trade context is busy] error?