Adding Indicators to Strategies
When backtesting strategies it can be useful to add the indicators you use for calculations onto the chart to make it easier to check your strategy for accuracy. Instead of doing this step manually every time you run the strategy you can program it to automatically load the indicators for you.
For example:
To add a volume indicator to your charts you need to add this code snippet into the OnStateChange section of your code for the State: State.DataLoaded
To choose which panel you want your indicator plotted on you can use this code snippet into the State.DataLoaded state:
To customize plot colors:
To customize plot width:
To customize the plot dash style:
To customize the plot style:
To customize lines you can do it the same way as above.
Remember, you need to use the AddChartIndicator() method to add your indicator if you wish to use any of the plot / line indicator customization examples.

