Summary: This commission script calculates the commission paid for an executed order, determined by a constant amount in addition to a variable amount based on the order quantity.
' Assign the parameters to script variables. _commissionPerOrder = commissionPerOrder _commissionPerUnit = commissionPerUnit
' Return the commission being paid for the executed order. If (orderFillIndex = 0) Then Return _commissionPerOrder + (_commissionPerUnit * quantity) End If Return _commissionPerUnit * quantity