AddCommission

Top  Previous  Next

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.

 

Syntax

 

instrument.AddCommission( [unitNumber], commission )

 

Parameters

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 of adding commission when an order is first entered. Place in the Entry Order Filled Script

 

' 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 )