ModifyOrderAssoc (GAIN Only)


ModifyOrderAssoc( <Broker>, <OrderID>, <OrderType>, <Price> );


<Broker> The selected Broker to fire the order to
<OrderID> Current Associated Order ID
<OrderType> "LIMIT" or "STOP"
<Price> The selected LIMIT/STOP PRICE for this order

This function places a new order to the selected broker with the selected parameters.  Users should then use the following MTS functions..


   PlaceOrderAssoc() to place a new ASSOC(iated) order

   getorderstatus() to get/verify the order status

   GetFillPrice() to get the fill price of the order

   GetFillAmount() to get the # of filled shares/contracts of the order

   Cancel() to properly cancel the order

   GetCurrentPosition() to verify the current position of the trading system


Return Values

 

OrderID MTS returns a valid OrderID for any succesfully submitted order
< 0     MTS returns a NEGATIVE NUMBER for any REJECTED order


Examples


var GAINMultiplier = 100000;

var DefEntryContracts = 1;


LEntryOrderID = mentts.call("ModifyOrderAssoc","GAIN", nStpOrderID,"STOP",nStopPrice);


This command adjusts the current stop order price to a new price level. This order was placed using PlaceOrderAssoc().