Adds commission per share/contract to the specified unit of the current position for the instrument. If there is no current position or the unit number is out of range, then it will return an error.

 

Example below is placed in the Entry Order Filled script section and it shows adding commission amount as part of the Order Filled process.

 

Syntax:

instrument.AddCommission( [unitNumber], commission )

 

Parameter:

Description:

[unitNumber]

The unit number to which the commission will be added.

commission

The commission amount to add per share or contract, in base system currency.

 

Example:

' Add $12 in commission per contract or share to this new unit.
' If there are 5 contracts or shares, the total commission added will be $60.
 
instrument.AddCommission( instrument.currentPositionUnits, 12 )

Returns:

A commission of $12 is added to the new position unit

 

Links:

Data Functions

See Also:

 

 


Edit Time: 9/25/2017 09:09:58 AM


Topic ID#: 118

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software