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 Initialize() section of your code.
Add(VOL());
VOLMA(20).Panel = 2; Add(VOLMA(20));
EMA(13).Plots[0].Pen.Color = Color.Blue; // Plots the EMA as a blue line
EMA(13).Plots[0].Pen.Width = 2; // Plots the EMA line with a width of 2
RegressionChannel(60, 2).Plots[0].Pen.DashStyle = DashStyle.Dash;
RSI(14, 3).Lines[0].Value = 20; RSI(14, 3).Lines[0].Pen.Color = Color.Green;
Comment