Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1628
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
er, didn't you ask about the modification error and its criticality?
...and its explanation
Taras asked
Please tell me if i have orders with TakeProfit and i am modifying them to calculate new TakeProfit.
&& tp!=OrderTakeProfit()
If I can say "and takeprofit does not equal takeprofit of the selected order".
Then we should write a new function to modify orders that have already been taken, but one of the check conditions should be
Can you give me a hint?
Taras asked
If i have an order with a takeprofit i am modifying it to calculate a new takeprofit, how should i add this to it?
If I can say "and takeprofit does not equal takeprofit of the selected order".
Then we should write a new function to modify orders that have already been taken, but one of the check conditions should be
Please tell me which way I am thinking.
Right - that way.
I have no errors in my tester. Tell me on which pair what date?
Tell me if I'm thinking in the right direction.
Not quite that way... As a rule, the TP is changed if the new TP brings more profit than the old one. And this condition
tp!=OrderTakeProfit()
can be met either upwards or downwards...
So we have to condition it > or < depending on the type of order.
It's not there
Everyone has
Right - that way.
I don't have a single error in my tester. Tell me on which pair what date?
Pound/Dollar but that's not the point, probably better to load this set file and as soon as a couple of orders are closed look at the log
Taras asked
I have orders with TakeProfit and i am modifying them to calculate new TakeProfit, how do i attach this
I already added it to your code line (in previous message).
The explanation is the same - the error occurs if you modify an order which already has the same TP.
When modifying an order, at least one parameter (TP, SL, Price) must be different.
In other words, "tp!=OrderTakeProfit()" means that there is no need to modify the order if it already has the same TP.
Everyone has
Mine is not on the C drive for some reason, but I found it via Open data directory in the terminal.
Pound / dollar but that's not the point, it's probably better to download this set file and as soon as a couple of orders are closed, look at the log
Many mistakes were due to inattention
now there are no errors
Does not count iATR and iVolumes
Print("iATR=",iATR(Symbol(),PERIOD_M5,1), " iVolumes=", iVolumes(Symbol(),PERIOD_M5,1));
It gives out 10 and 10 all the time. Please tell me what to do.