Bug or what ?

 

Hi ppl,

I found that when I try to make a new order like this

OrderSend(Symbol(),OP_SELLLIMIT, lots, Ask+100,0,Ask+200*Point,Ask-200*Point,"",0,0,0);

the journal says OrderSend error 130 /// invalid stops

I don't understand why

Can I set sl and tp or not ?

 
ludsic wrote >>

Hi ppl,

I found that when I try to make a new order like this

OrderSend(Symbol(),OP_SELLLIMIT, lots, Ask+100,0,Ask+200*Point,Ask-200*Point,"",0,0,0);

the journal says OrderSend error 130 /// invalid stops

I don't understand why

Can I set sl and tp or not ?

Hi Yordan,

Your problem is in the price field: Ask+100 should be followed by *Point

The way it is written, the stop-loss (ask + 200 pips) is lower than the price (ask + 100 dollars - or whatever the currency is), which is invalid for a sell order.

Good Luck,

Tovan

 

Hi again,

It works!

And what can I say? One Big Thanks!

Regards, Yordan

Reason: