Problem with sending a pending order via script

 

Hello

I have the following question.

I have a script that is sending sell pending orders for me and at certain values i get the error 130. The thing is that i am almost sure that there is no error in the order details moreover it works for the other values.

the order giving the error had the following valuse:

Sell limit pending order with trigger 0.6753

takeprofit : 0.6740

no stoploss and no expiration date .

the current bid was 0.6853

Any one that knows why this is not ok ? it not the script i use the same script for an order with trigger 0.6844 and it worked.

 
Error 130 means you are either too close to the current price or your order/SL is placed illogically, meaning you place your SL above the opening price of the order when buying and so on. In this case you are trying to send a Sell Limit order lower than the current price. That must be Sell Stop (OP_SELLSTOP) order since you are placing it below the current price, Sell Limit (OP_SELLLIMIT) is for opening the Sell order above the current price in anticipation of a reversal.

My best,
Jan
 
janklimo:
Error 130 means you are either too close to the current price or your order/SL is placed illogically, meaning you place your SL above the opening price of the order when buying and so on. In this case you are trying to send a Sell Limit order lower than the current price. That must be Sell Stop (OP_SELLSTOP) order since you are placing it below the current price, Sell Limit (OP_SELLLIMIT) is for opening the Sell order above the current price in anticipation of a reversal.

My best,
Jan


Thanks alot for your help it was exactly the solution of my problem...

Thanks again