problem with pending order throwing error 130 on order send

 
OrderSend(Symbol(),OP_BUYLIMIT,startVolume,Ask+ strategySelectMovement*pip,0, 0,Ask+strategySelectMovement+ martingaleTakeProfit*pip);


Here is the code im using, if i change OP_BUYLIMIT to OP_BUY (changing ask to market) the strategy works fine, however it wont let me do it with a limit.

There is no minimum pip difference from market with this broker.. everything on the web i find seems to have to do with people putting there orders to close but this is not the case here, any ideas on what it could be?

Any help appreciated!
 
OrderSend(Symbol(), OP_BUYLIMIT, startVolume, Ask+ strategySelectMovement*pip, 0, 
          0, Ask+strategySelectMovement+ martingaleTakeProfit*pip);

  1. For large amounts of code, attach it
  2. RFTM. A BUYLIMIT is to buy BELOW current price. You're setting a price above.
  3. For ECN brokers you must open first and then set stops. This may be necessary for pending orders also.
 

Buy limit must be below the current ask price to be valid - you are adding to the ask price so it is not a valid buy_limit. would work with a buy_stop.

stop orders are for continuation of trend

limit oders are for trend reversal.

Reason: