Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1203
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
This way? Or do I need to declare something else in OnInit?
No,all lines in OnInitare hidden by default:
No,all lines are hidden by default inOnInit:
The condition is ignored for some reason. Even if I set a position opening.
PRL variable can't be yanked and put in a condition.
I'm trying to pull it out somehow with GlobalVariableGet . But somehow it's doubtful...
Even when I put it inside the condition. The minimum price is already set. But it still stubbornly refuses to open the position.
The condition is ignored for some reason. Even if I set a position opening.
The PRL variable cannot be yanked and put in a condition.
We get the following picture:
Therefore, instead ofPRL you can take iLow(NULL, PERIOD_CURRENT, 1) or l1.
I get the impression that you're not interested in writing code and don't understand what you're doing. A little patience and you can easily figure it all out. Clean up your code and many questions will disappear on their own. If you cannot figure out what went wrong, there is also debugging, it is a very powerful tool of a programmer. Get to the bottom of what you are doing and then ask questions.
The condition is ignored for some reason. Even if I set a position opening.
Variable PRL cannot be yanked and put in a condition.
I'm trying to pull it out somehow with GlobalVariableGet . But somehow it's doubtful...
Even when I put it inside the condition. The minimum price is already set. I still do not want to open a position.
So, why do I have to write one message first and then edit it?
The condition is ignored for some reason. Even if I set a position opening.
Variable PRL cannot be yanked and put in a condition.
I'm trying to pull it out somehow with GlobalVariableGet . But somehow it's doubtful...
Even when I put it inside the condition. The minimum price is already set. I still do not want to open a position.
The algorithm in your code was originally wrong, as well as the market entry algorithm. I have corrected it.
But this code will need a lot of revisions to be able to use it in real trading...
In your code, the algorithm itself was originally wrong, as well as the algorithm for entering the market. Corrected it.
But to use this code in real trading you will need a lot of revisions...
How, in the tester, can a 4108 (invalid ticket) occur during a modification? MQL4
How, in the tester, can a 4108 (invalid ticket) occur during a modification? MQL4
most likely you are trying to close an order that is already in the history, i.e. already closed order
look in the SELECT_BY_TICKET help file, it does this regardless of whether the order is already open or in the order history
SZZY: do a check for OrderCloseTime()
you are most likely trying to close an order that is already in the history, i.e. already closed order
look through the SELECT_BY_TICKET help file. It does this regardless of whether the order is already open or in the order history
SZY: check OrderCloseTime()
I think it says that select in the market
I think that says choose which one is on the market.
Didn't think I'd have to quote you on the documentation...
Note
The parameter pool is ignored if the order is selected using the ticket number. The ticket number is the unique identifier for the order.
To determine from which list an order is selected, we should analyse its closing time. If the time of order closing is 0, then the order is open or pending and is taken from the list of open orders of the terminal.