Play videoPlease edit your post.
For large amounts of code, attach it.
- There is nothing wrong with your posted coded. Comment out the while loop through the closing brace and find the real error.
Hello,
I am currently writing an EA (have a small amount of programming experience in other languages but nothing worth mentioning) that has a section for opening orders.
In the open buy orders section, the code works perfectly with no erros.
In the open sell section, the code was copied, pasted and then edited for an open sell trade but I have two errors involving the continue and break operators even though they are the same as the ones in the buy section that have no error
Could somebody have a look and see if theyu can spot what I'm doing wrong? The code is below and the error messages further below that.
Thanks in advance
The errors are as follows:
'break' - 'break' or 'continue' used within some cycle only C:\LAPTOP FILES\business\mt4\experts\120 12 ma 5 opening orders.mq4 (75, 10)
'continue' - 'break' or 'continue' used within some cycle only C:\LAPTOP FILES\business\mt4\experts\120 12 ma 5 opening orders.mq4 (72, 16)
It is not clear whether you are asking advice on the compiling or the execution of the code.
I don't think that it answers your question, but I think that you intend to test that ticket >0
ticket = OrderSend(symb, OP_BUY, lts, Ask, 2, SL, NULL); //open buy position if(ticket < 0) //This would mean that the order failed
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I am currently writing an EA (have a small amount of programming experience in other languages but nothing worth mentioning) that has a section for opening orders.
In the open buy orders section, the code works perfectly with no erros.
In the open sell section, the code was copied, pasted and then edited for an open sell trade but I have two errors involving the continue and break operators even though they are the same as the ones in the buy section that have no error
Could somebody have a look and see if theyu can spot what I'm doing wrong? The code is below and the error messages further below that.
Thanks in advance
The errors are as follows:
'break' - 'break' or 'continue' used within some cycle only C:\LAPTOP FILES\business\mt4\experts\120 12 ma 5 opening orders.mq4 (75, 10)
'continue' - 'break' or 'continue' used within some cycle only C:\LAPTOP FILES\business\mt4\experts\120 12 ma 5 opening orders.mq4 (72, 16)