oladapolaleye:
Please help on: OrderSend error 3
This is the code:
switch(error_code) { //--- codes returned from trade server case 0: case 1: error_string="no error"; break; case 2: error_string="common error"; break; case 3: error_string="invalid trade parameters"; break; case 4: error_string="trade server is busy"; break; case 5: error_string="old version of the client terminal"; break; case 6: ....
// check for long position (BUY) possibility if(New_Bar==1 && Slope>1.57000) { ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots,Ask+500*Point,30,Ask+500*Point-StopLoss*Point,Ask+500*Point+TakeProfit*Point,"Ma13",5000,expire,Green); 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); }
Check the parameters
oladapolaleye:
Please help on: OrderSend error 3
This is the code:
Hi,
A good and recommended practice is to normalize double before sending the order :
double sl=NormalizeDouble(Ask+500*Point,Digits); double tp=Norm....
Also, some brokers on live accounts only allow EA's to place orders without stop loss and take profits and then modify the orders to the desired stop and take profit.
Hope it helps.
thrdel:
I thought that that had changed and an EA can include SL and TP in the OrderSend.
Also, some brokers on live accounts only allow EA's to place orders without stop loss and take profits and then modify the orders to the desired stop and take profit.
GumRai:
I thought that that had changed and an EA can include SL and TP in the OrderSend.
I thought that that had changed and an EA can include SL and TP in the OrderSend.
Depends on broker taste.
deysmacro:
Depends on broker taste.
I don't think so. You can now send an order with SL/TP on any broker, independently of the usage of Instant Execution or Market Execution. I don't have checked every broker though, of course.
Depends on broker taste.
angevoyageur:
I don't think so. You can now send an order with SL/TP on any broker, independently of the usage of Instant Execution or Market Execution. I don't have checked every broker though, of course.
I don't think so. You can now send an order with SL/TP on any broker, independently of the usage of Instant Execution or Market Execution. I don't have checked every broker though, of course.
My broker is not fussy, so, can include SL/TP for Instant Execution or Market Execution though.
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
Please help on: OrderSend error 3
This is the code: