| New signals service! | |
|
|||||||
| 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 |
|
|||
|
EA need yr support!
hi All
Can you please help me in coding my EA, i need to place tow pending orders buystop and sellstop for each of the main currency pairs, at the same time, when ever i try to code that it gave me error #130, and always send one pending order buystop and never send the sellstop order at the same time will u help please Thansk in advance |
|
|||
|
Quote:
but i did try to make a difference 10 and even 20 pips and still open only one buy or sell stop and not both orders in the same time? here is the code : if ( EAtotal<2 ) OrderSend(Symbol(),OP_SELLSTOP,Lots,S,3,Bid-SL*Point,Bid+TP*Point,"HOG",0,0,Red); if(ticket>0) { if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES )) Print("BUY order opened : ",OrderOpenPrice()); } else Print("Error opening BUY order : ", GetLastError()); return(0); RefreshRates(); OrderSend(Symbol(),OP_SELLSTOP,Lots,b,2,Bid-SL*Point,Bid+TP*Point,"HOG",0,0,Red); if(ticket>0) { if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES )) Print("SELL order opened : ",OrderOpenPrice()); } else Print("Error opening SELL order : ",GetLastError()); return(0); } } return(0); } hope you help me to adujust it Thanks in advance |
|
|||
|
Quote:
If you email me the code I can take a look at it. My email address is tradermaji at cox dot net Thanks, Maji |
|
||||
|
Quote:
|
|
|||
|
Quote:
here it is again : if ( EAtotal<2 ) OrderSend(Symbol(),OP_SELLSTOP,Lots,S,3,Bid-SL*Point,Bid+TP*Point,"HOG",0,0,Red); if(ticket>0) { if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES )) Print("BUY order opened : ",OrderOpenPrice()); } else Print("Error opening BUY order : ", GetLastError()); return(0); RefreshRates(); OrderSend(Symbol(),OP_SELLSTOP,Lots,b,2,Bid-SL*Point,Bid+TP*Point,"HOG",0,0,Red); if(ticket>0) { if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES )) Print("SELL order opened : ",OrderOpenPrice()); } else Print("Error opening SELL order : ",GetLastError()); return(0); } } return(0); } |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Support! | codersguru | Metatrader 4 mql 4 - Development course | 53 | 04-17-2006 05:49 AM |