ERROR 130: Pending Order with ECN that has MODE_STOPLEVEL of 0

 

This doesn't make sense to me...so I'm here to ask for some help.


In my Expert Advisor I am placing a pending BUY STOP above current Price, yet it is generating the 130 INVALID STOPS error.


This is an ECN broker that doesn't allow stoploss or takeprofit on pending orders... so I have set those values to 0.


The MODE_STOPLEVEL returns 0. Therefore I should be able to place a BUY STOP anywhere above the current price.


I don't understand why it is giving me the 130 error.


Here is a snip of my code:


{ticket=OrderSend(Symbol(),OP_BUYSTOP,LotSize,EntryPrice,0,0,0,ExpertName,MagicNumber,0,Green);}

Any help would be appreciated. Thank you!

 

Problem solved. It was an error on code for order modification, not order sending.

Reason: