- for(int i=0;i<OrdersTotal();i++){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
if(OrderSymbol() == Symbol() && OrderMagicNumber()==MagicNumberSELL)
// QUESTA ISTRUZIONE E' L'EFFETTIVA CHIUSURA DELL'ORDINE:
OrderClose(OrderTicket(), OrderLots(), Ask, 3, DeepPink); - OrderClose(OrderTicket(), OrderLots(), Ask, 3, DeepPink);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
OrderSend(Symbol(), OP_SELL, Lots, Bid, 3, Bid+Stoploss*Point*MyPoint, Bid-Takeprofit*Point*MyPoint ,"EA BC Sell", MagicNumberSELL, 0, Red);
- print out your variable values at if statements and find out why.

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 guys, I have some problems whith an EA I'm trying to write... The EA is simple. There is and indicator that draw a down arrow for sell and a up arrow for buy.
My EA will buy or sell where the arrow appears (at the same candle).
I tryed to do this but there is something wrong..... please help me.....
The EA, for now, do nothing with stoploss or take profit