|
Commission Scripts
Commission scripts are used to calculate the brokerage commission for executed orders.
Different brokerages have different commission schemas which
can have a huge effect on an trading system's performance.
The IQBroker automated trading software ships with a library of premade commission scripts that can be parameterized
and customized without any programming, while custom scripts can be easily developed
using the resource designer and IQLanguage.
Script Implementation
|
OnInitialize()
|
|
This function is called automatically when the script is first initialized.
|
|
|
OnCommission(orderIndex As Integer) As Number
|
|
orderIndex – The order index in the orders table.
|
|
This function is called automatically for each executed order, its implementation
should return the brokerage commission that the order generated, denominated in
the portfolio account currency.
|
|
|