SetQuantity

Top  Previous  Next

Sets the quantity for an order to the specified amount. This function is only available to the Unit Size, Can Add Unit, and Can Fill Order Script script and is used to set the order quantity.

 

NOTE: This function is only valid for Entry Orders and is ignored for Exit Orders.

 

Syntax

 

SetQuantity( quantity )

 

Parameters

quantity

 

the quantity for the order

 

Example

' Assume we only get filled on 1/2 our order because

' the quantity was too large for the volume that day.

order.SetQuantity( order.quantity / 2 )