Difference between revisions of "Input"

From MultiCharts
Jump to navigation Jump to search
m (Reverted edits by 176.8.90.7 (talk) to last revision by 194.84.116.138)
m
Line 2: Line 2:
 
Inputs can be numerical, string, or true/false. Once declared, the value of the input cannot be modified by the study's code.  
 
Inputs can be numerical, string, or true/false. Once declared, the value of the input cannot be modified by the study's code.  
 
   
 
   
==== Usage ====
+
== Usage ==
<syntaxhighlight>Input:InputName1(DefaultValue1), InputName2(DefaultValue2), etc.</syntaxhighlight>  
+
<syntaxhighlight>Input: InputName1(DefaultValue1), InputName2(DefaultValue2), etc.</syntaxhighlight>  
  
==== Parameters ====  
+
== Parameters ==
[[InputName]] - an expression specifying the input name  
+
:'''InputName''' - an expression specifying the input name. The name can consist of letters, underscore characters, numbers, and periods. The name cannot begin with a number or a period and is not case-sensitive.
 +
:'''DefaultValue''' - an expression specifying the default value and defining the input type. The expression can be numerical, string, or true/false; the type of the expression defines the input type.
  
The name can consist of letters, underscore characters, numbers, and periods. The name cannot begin with a number or a period and is not case-sensitive.
+
== Example ==
 
 
[[DefaultValue]] - an expression specifying the default value and defining the input type
 
 
 
The expression can be numerical, string, or true/false; the type of the expression defines the input type.
 
 
==== Example ====
 
 
Declare Length as a numerical input with the default value of 20:  
 
Declare Length as a numerical input with the default value of 20:  
  
<syntaxhighlight>Input:Length(20);</syntaxhighlight>  
+
<syntaxhighlight>Input: Length(20);</syntaxhighlight>  
  
 
Declare Price as a numerical input with the default value equal to the value of Close function, and Name as a character string input with the default value of "Last Close":  
 
Declare Price as a numerical input with the default value equal to the value of Close function, and Name as a character string input with the default value of "Last Close":  
  
<syntaxhighlight>Input:Price(Close), Name("Last Close");</syntaxhighlight>  
+
<syntaxhighlight>Input: Price(Close), Name("Last Close");</syntaxhighlight>  
  
 
Declare Draw_Line as a true/false input with the default value of True:  
 
Declare Draw_Line as a true/false input with the default value of True:  
  
<syntaxhighlight>Input:Draw_Line(True);</syntaxhighlight>
+
<syntaxhighlight>Input: Draw_Line(True);</syntaxhighlight>
 
 
  
  
 
[[Category:Declaration]]
 
[[Category:Declaration]]

Revision as of 05:51, 8 April 2013

Declares one or more names as inputs; specifies the default value and defines the input type for each input. Inputs can be numerical, string, or true/false. Once declared, the value of the input cannot be modified by the study's code.

Usage

Input: InputName1(DefaultValue1), InputName2(DefaultValue2), etc.

Parameters

InputName - an expression specifying the input name. The name can consist of letters, underscore characters, numbers, and periods. The name cannot begin with a number or a period and is not case-sensitive.
DefaultValue - an expression specifying the default value and defining the input type. The expression can be numerical, string, or true/false; the type of the expression defines the input type.

Example

Declare Length as a numerical input with the default value of 20:

Input: Length(20);

Declare Price as a numerical input with the default value equal to the value of Close function, and Name as a character string input with the default value of "Last Close":

Input: Price(Close), Name("Last Close");

Declare Draw_Line as a true/false input with the default value of True:

Input: Draw_Line(True);