Help with Ordersend

 

Hi there,

I'm supposed to do something fairly simple, but I'm getting problems.

 I receive a variable containing the SL level, that I want to use in my OrderSend.

 Everything works fine if I calculate my sl based on Ask price as in ordersend example in doc, but I get error 130 if I try to directly insert the value in my command.

 So, can you tell me what's wrong in this:

OrderSend("EURUSD",OP_BUY,0.01,Ask,3,1.0,0,"TEST",0,0,Red);

I also tried with a NormalizeDouble(1.0,5) , with no success.


Any help is very welcome!

 

Best

Francesco 

 
frankjibe:

Hi there,

I'm supposed to do something fairly simple, but I'm getting problems.

 I receive a variable containing the SL level, that I want to use in my OrderSend.

 Everything works fine if I calculate my sl based on Ask price as in ordersend example in doc, but I get error 130 if I try to directly insert the value in my command.

 So, can you tell me what's wrong in this:

OrderSend("EURUSD",OP_BUY,0.01,Ask,3,1.0,0,"TEST",0,0,Red);

Your Broker is probably an ECN type Broker,  follow this link for lots of info:  ECN
Reason: