|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Need Help In Expert ..Please!!
Hello,
I am working on this Meta 4 Expert that sets Limt Orders befor 4Levels of Resistance and 4 levels of support. The problem I am facing that it keeps on adding some of the orders befor they get excuted or opened. ...................... Can some one tell me what and where to add instructions for the expert to make one order only for each level and not to set another order at that level until the first one is closed (Profit or Stop) I mean not to double the order !!! .................. It currently reads like this: total=OrdersTotal(); for (i=0;i<total;i++) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) { if (OrderSymbol() == Symbol()) { if((TimeDayOfYear(OrderOpenTime())!=DayOfYear())) { OrderDelete(i); i--; total=OrdersTotal(); } else { ........................................ and the order is Like this: if (!L7Order) { ticket=OrderSend(Symbol(),OP_BUYLIMIT,Lots,L7+3*Po int+(Ask-Bid),0,L7-12*Point,L7+15*Point,"L7 Order",10017,0,Green); if(ticket>0) { if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES )) Print("BUY L7 order opened : ",OrderOpenPrice()); } else Print("Error opening BUY order : ",GetLastError()); } .................................................. ............................. Also one of the Orders does not come on order window it seems to have an error...can some one fix it please !!! This is how it reads: if (!L2Order) { ticket=OrderSend(Symbol(),OP_BUYLIMIT,Lots,L2+3*Po int+(Ask-Bid),0,L1-12*Point,L2+15*Point,"L2 Order",10012,0,Green); if(ticket>0) { if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES )) Print("BUY L2 order opened : ",OrderOpenPrice()); } else Print("Error opening BUY order : ",GetLastError()); } ................ Thank You. |
|
|||
|
Penn State,
Good game the other night. Good to see JoePa win another for Happy Valley! I graduated from there in '88. Why don't you post your whole EA so it can be reviewed. I might have trade execution routine that you can add your logic to. It checks for trades in that symbol and won't allow another until current trade is closed. A couple of us are working to enter multiple lots and close out single lots at different levels based on fib levels or pip profit as trade progresses and changing stop loss along the way. Also describe in some detail trading method for possible logic change. Last edited by traden4x : 01-07-2006 at 05:06 PM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Expert Question and Expert | mj10 | Expert Advisors - Metatrader 4 | 24 | 03-27-2006 01:31 PM |