|
Tax System Scripts
A strategy portfolio can be assigned a tax
system script to calculate and reduce stocks, futures and FOREX capital gain taxes
from the portfolio accounts. A tax system script
will usually calculate the taxes on the entire portfolio and only then decide how
much tax to reduce from each account.
The IQBroker automated trading software ships with a library of premade tax system 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.
|
|
|
OnTax()
|
|
This function is called automatically at the end of each portfolio day, its implementation
should calculate and reduce capital gain taxes from the portfolio accounts when needed.
|
|
|