OrderSelect(i,SELECT_BY_POS,MODE_TRADES); : OrderSend(Symbol(),OP_SELL,Lots,Bid,0,Bid+(StopLoss*p),Bid-(TakeProfit*p), "Aglako kan a"+CurTime(),MagicNumber,0,Red); : OrderClose(OrderTicket(),Lots,Bid,0,White);
What are Function return values ? How do I use them ? - MQL4 forumDati = (OrderClosePrice()-OrderStopLoss())/Point; if ((Daan>TrailingStop)
Not auto-adjusting for 4/5 digit brokers Problems with a calculation - MQL4 forumif( OrderSymbol()==Symbol() ) OrdersPerSymbol++;
Should that be per symbol (any EA or manual trade) or per symbol and the EA? order accounting - MQL4 forumfor(cnt=OrdersTotal();cnt>=0;cnt--){ OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
Order positions are 0 to OrdersTotal()-1 for a TOTAL count of OrdersTotal(). There is no position number OrdersTotal(). First OrderSelect always fails. Not checked (#1) rest of code uses bogus values.
Thank you very much WHRoeder for the correction.
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
Hello! Forum members:
I'm not a programmer but I developed an EA by merging several EA's. I tried monthly back testing and it gives positive monthly result for the past 8 months. i appreciate very much if you try and give comment on it or introduce some modification to improve the performance. Please see attached. Thank you.