// return >0 : ticket modified // =0 : nothing found // <0 : error int BreakEven(int MN) { int Ticket=0;
ok thanks
nice solution...
- Please edit your (original) post and use the CODE
button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor -
bool BreakEven(int MN){ int Ticket; return (Ticket);
Your function returns a boolean. A ticket is not. Either change its return type or return a bool. Which depends on the calling code. -
Ticket = OrderModify(OrderTicket(), OrderOpenPrice(), OrderOpenPrice(), OrderTakeProfit(), 0, Green); if(Ticket < 0) Print("Error in Break Even : ", GetLastError());
Perhaps you should read the manual. OrderModify does not return a ticket. -
Why did you post your MT4
question in the
Root / MT5 General section
instead of the
MQL4 section, (bottom of the Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon.
ok im sorry, i just read this message

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
3
4
16 }
** if compile : appear description expression not boolean Line 15