Tax System Scripts
Tax system scripts are used for calculating and reducing the capital gain taxes created by the strategies.
Setup
A Tax System script can be set up from the Advanced tab in the Desktop Settings.
Functions
|
Name |
Description |
|
This function is used for accepting the script parameters and for initializing the script prior to all other function calls. Once the script is assigned to a Desktop, its parameter values can be specified by the user and can be selected for optimization. |
|
|
This function is called daily at the Desktop EOD time (23:59:59 UTC), at which point it should calculate and reduce capital gain taxes from the Desktop strategies as needed. Since taxes are usually calculated only once a year or once a quarter it should start by checking the current date before running any time-consuming calculations (see the Tax functions). |
|
|
This function is called when the script is shutdown. |
Function Details
|
OnInitialize() |
|
This function is used for accepting the script parameters and for initializing the script prior to all other function calls. Once the script is assigned to a Desktop, its parameter values can be specified by the user and can be selected for optimization. |
|
OnTax() |
|
This function is called daily at the Desktop EOD time (23:59:59 UTC), at which point it should calculate and reduce capital gain taxes from the Desktop strategies as needed. Since taxes are usually calculated only once a year or once a quarter it should start by checking the current date before running any time-consuming calculations (see the Tax functions). |
|
OnShutdown() |
|
This function is called when the script is shutdown. |