Where did I do wrong ? Help for newbie. (Function Call or Loop Error , I don't know)
Cnsnmms: didn't produce any error code...
OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage,SellStopLossLevel, SellTakeProfitLevel); closed=OrderClose( OrderTicket(), OrderLots(), Ask,0, White);
- No error code because you don't check for them.
- Check your return codes and find out why. What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
- In the presence of multiple orders (one EA multiple charts, multiple EA's, manual trading)
you must count down when closing/deleting/modifying in a position loop. Get in the habit of always counting down. Loops and Closing or Deleting Orders - MQL4 forum
Thanks for comment. I solved it and you are right about the error code problem :) sorry
Hi, I'm trying to write a simple rsi EA code for mt4 but my code is working just part time . ClosePosition function is not working.( probably my code is a bit weirdo lol ) . It worked without a problem few times but mostly didn't work on the same computer and also didn't produce any error code... I'm trying to solve the problem since 3 hours. Anyone can explain me the overall problem also where I exactly put the ClosePosition function in the code ?