In MultiCharts .NET you’ll often change something related the chart window, such as switching to another symbol, adding a trading strategy, or reloading price data. All of these things (and more) can also be done with the Command Line.

What is the MultiCharts .NET Command Line?

The MultiCharts .NET Command Line is a toolbar that manipulates the active chart window through textual commands (see MultiCharts Wiki, 2014). It looks like:

Example of the MultiCharts .NET Command Line toolbar

Typically, the Command Line is displayed in the top of the main MultiCharts .NET window. If you cannot locate it anywhere, it likely needs to be enabled: go to ‘View’, select ‘Toolbars’, and enable ‘Command Line’ (the image below is edited for brevity; ‘Toolbars’ is at the very bottom of the long ‘View’ menu):

Enabling the Command Line in MultiCharts .NET

Regardless of the Command Line being enabled or not, the commands can also be executed programmatically with the ChartCommands.CommandLine() method (PowerLanguage .NET Help, n.d.). See working with the asynchronous Command Line method to learn more about this method.

Tip: Each time ChartCommands.CommandLine() is called, its string argument with the Command Line command is executed. This can, for example, lead to dozens of identical indicators being added to the chart. Execute this method conditionally to prevent this (such as only when a Boolean variable is false).

Changing the bar spacing with the Command Line

The Command Line articles begin with the .bsi, .bsd, and .eds commands for changing the bar spacing (MultiCharts Wiki, 2014).

Switching data series with the MultiCharts .NET Command Line

The .csy Command Line command alters a chart’s data series (MultiCharts Wiki, 2014), such as changing the chart symbol:

Changing a chart’s data range with the Command Line

The .csy command’s from and to parameters change the data range of a data series (MultiCharts Wiki, 2014). This feature is discussed in:

Altering the resolution of data series in MultiCharts .NET

Another application of .csy is changing a symbol’s resolution with the res parameter (MultiCharts Wiki, 2014).

Adding a data series with the MultiCharts .NET Command Line

The .isy Command Line command adds a symbol to the chart (MultiCharts Wiki, 2014).

Adding MultiCharts .NET indicators and trading strategies

The .iind command adds an indicator to the chart, while .isig adds a trading strategy (MultiCharts Wiki, 2014). These commands are discussed in:

Managing trading strategies with the Command Line

The .rep command brings up the chart’s ‘Strategy Performance Report’, while .at_toggle enables or disables automated trading (MultiCharts Wiki, 2014). These commands were examined in:

Reloading a chart’s price data programmatically

The .rld Command Line command reloads price data (MultiCharts Wiki, 2014). We use that command in the following articles:

This ‘chapter’ on the Command Line concludes with a summary of the Command Line.


References

MultiCharts Wiki (2014, August 18). MultiCharts Work Area: Understanding Command Line. Retrieved on December 21, 2014, from http://www.multicharts.com/trading-software/index.php/MultiCharts_Work_Area#Understanding_Command_Line

PowerLanguage .NET Help (n.d.). Retrieved on November 18, 2014, from http://www.multicharts.com/downloads/PowerLanguage.NET.chm