NinjaScript > Language Reference > Data >

OnTermination()

Print this Topic Previous pageReturn to chapter overviewNext page

Definition
For advanced programmers: You can override the OnTermination() method to clean up all resources owned by the custom indicator or strategy.

 

Note: Please do NOT overload the Dispose() method. Dispose() method could be triggered much later than expected resulting in resources not being released early enough.

 
Method Return Value

This method does not return a value.

 

Syntax
You must override the method in your strategy or indicator with the following syntax.

 

protected override void OnTermination()
{

 
}

 

 

Examples

protected override void OnTermination()
{
    // Clean up your resources here
}