HenryJack:
What was mt4 expecting on 145?
Why is 104 unbalanced.
I thought I did defind GetTotalProfits on line 72.
I thought I did defind CloseAllTrades on line 72.
- You have an error at 104. Ignore all errors below that until you fix 104, and recompile.
for (int t=0; t<OrdersTotal();
This statement does nothing. It is not connected to the code below.- Count the parentheses.
- No that is a call. You tried defined it on line 126 but you have an error at 104. Ignore all errors until you fix 104, and recompile.
- No that is a call. You tried to define it on line 103 but you have an error at 104.
Ignore all errors until you fix 104, and recompile.
- 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. CloseResult = OrderClose(OrderTicket(), OrderLots(), Bid, MaxCloseSpreadPips, clrRed);
Check your return codes for errors, and report them including GLE/LE. Don't look at it unless you have an error. Don't just silence the compiler, it is trying to help you.
What are Function return values ? How do I use them ? - MQL4 and MetaTrader 4 - MQL4 programming forum
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
Only those functions that return a value (e.g. iClose, MarketInfo, etc.) must you call ResetLastError before in order to check after.if OrderType() == OP_BUY) CloseResult = OrderClose(OrderTicket(), OrderLots(), Bid, MaxCloseSpreadPips, clrRed); if OrderType() == OP_SELL) CloseResult = OrderClose(OrderTicket(), OrderLots(), Ask, MaxCloseSpreadPips, clrRed);
You can use OrderClosePrice() instead of Bid/Ask.
www.mql5.com/en/forum/158890/page3#comment_3812636
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
Hi all,
ha yeah one more new coders..
(code it at bottom)
What was mt4 expecting on 145?
Why is 104 unbalanced.
I thought I did defind GetTotalProfits on line 72.
I thought I did defind CloseAllTrades on line 72.
Thanks for the help!