Difference between revisions of "CommandLine"

From MultiCharts
Jump to navigation Jump to search
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
Passes a string expression from script to command line.  
 
Passes a string expression from script to command line.  
 +
<div style="background-color: #E3FBE5;">'''Note:''' This keyword can be used if a study is applied to a chart. It is ignored in [[Portfolio Trader]] and [[Understanding Real-Time Market Scanner|Real-Time Market Scanner]]. </div>
  
 
== Usage ==
 
== Usage ==
  
<syntaxhighlight>CommandLine("Expression1")</syntaxhighlight>  
+
<syntaxhighlight>CommandLine("Expression")</syntaxhighlight>
 +
 
 +
See the [[MultiCharts Work Area#The List of Supported Commands|list of supported expressions]] for the command line.
  
 
== Examples ==
 
== Examples ==
Line 15: Line 18:
 
Turns on/off auto trading on the chart where the script is applied (if it is used to turn auto trading on, the popped up confirmation window cannot be skipped and a manual click on "OK" is required).
 
Turns on/off auto trading on the chart where the script is applied (if it is used to turn auto trading on, the popped up confirmation window cannot be skipped and a manual click on "OK" is required).
  
<syntaxhighlight>CommandLine(".csy dnum=1, name=AUD/CHF, df=LMAX");
+
<syntaxhighlight>CommandLine(".csy dnum=1, name=AUD/CHF, df=LMAX");</syntaxhighlight>
</syntaxhighlight>
 
  
 
Changes the symbol plotted as data series 1 to AUD/CHF and the data source to LMAX on the chart where the script is applied.
 
Changes the symbol plotted as data series 1 to AUD/CHF and the data source to LMAX on the chart where the script is applied.
 +
 +
<syntaxhighlight>CommandLine(".isy name=@ES#, df=IQFeed, res=1 min, desc=E-MINI S&P 500 MARCH 2013, from=12/31/2012, to=5/10/2013");</syntaxhighlight>
 +
 +
Inserts 1 minute graph of S&P mini 500 from IQFeed starting from 31th of December 2012 up to 10th of May 2013 as additional data series to the chart where the script is applied.
 +
 +
<syntaxhighlight>CommandLine(".iid name=MACD, base=1, bref=100");</syntaxhighlight>
 +
 +
Applies MACD indicator to the data series 1 with MaxBarsBack parameter = 100 to the chart where the script is applied.
 +
 +
<syntaxhighlight>CommandLine(".rld int = 2 weeks");</syntaxhighlight>
 +
 +
Reloads 2 weeks of data on the chart where the script is applied.
  
 
[[Category:Execution Control‎]]
 
[[Category:Execution Control‎]]

Latest revision as of 17:27, 3 July 2023

Passes a string expression from script to command line.

Note: This keyword can be used if a study is applied to a chart. It is ignored in Portfolio Trader and Real-Time Market Scanner.

Usage

CommandLine("Expression")

See the list of supported expressions for the command line.

Examples

CommandLine(".rld");

Reloads the chart where the script is applied (reloads all chart where the same symbol is used).

CommandLine(".at_toggle");

Turns on/off auto trading on the chart where the script is applied (if it is used to turn auto trading on, the popped up confirmation window cannot be skipped and a manual click on "OK" is required).

CommandLine(".csy dnum=1, name=AUD/CHF, df=LMAX");

Changes the symbol plotted as data series 1 to AUD/CHF and the data source to LMAX on the chart where the script is applied.

CommandLine(".isy name=@ES#, df=IQFeed, res=1 min, desc=E-MINI S&P 500 MARCH 2013, from=12/31/2012, to=5/10/2013");

Inserts 1 minute graph of S&P mini 500 from IQFeed starting from 31th of December 2012 up to 10th of May 2013 as additional data series to the chart where the script is applied.

CommandLine(".iid name=MACD, base=1, bref=100");

Applies MACD indicator to the data series 1 with MaxBarsBack parameter = 100 to the chart where the script is applied.

CommandLine(".rld int = 2 weeks");

Reloads 2 weeks of data on the chart where the script is applied.