desktop:desktop_chart_scripting_function_reference_input_value_1_..._value_n

INPUT Function

The input function allows for user configuration of script parameters to customize a script on a chart. For example, a script that used a moving average would use the INPUT function to get the number of periods to use for the moving average. That would allow the same script to be used on multiple charts with different values for the number of periods.

  • INPUT(<label>, <number>, <min value>, <max value>)

Function Parameters
Parameter Description
<label>The label that appears on the property page for this value.
<number>The number of periods to compute the moving average over.
<min value>The minimum value allowed for this input.
<max value>The maximum value allowed for this input.

| Examples:
periods = INPUT("Moving Average Periods", 14, 1, 1000);
variance = INPUT("Variance", 0.25, 0, 1.0);

Image

  • INPUT(<label>, <text>)

Function Parameters
Parameter Description
<label>The label that appears on the property page for this value.
<text>The default value for the text.

| Example:
descr = INPUT("Description", "Default Value");
  • INPUT(<label>, <color>)

Function Parameters
Parameter Description
<label>The label that appears on the property page for this value.
<color>The default color value specified as a name Color.Black or a hex value. See http://msdn.microsoft.com/en-us/library/system.drawing.knowncolor.aspx

| Example:
linecolor = INPUT("Line Color", Color.Blue);
  • INPUT(<label>, <lookup>);

Function Parameters
Parameter Description
<label>The label that appears on the property page for this value.
<lookup>The default lookup value.

| Example:
mtype = INPUT("Moving Average Type", MAType.SMA);
  • desktop/desktop_chart_scripting_function_reference_input_value_1_..._value_n.txt
  • Last modified: 2023/09/21 19:58
  • by 127.0.0.1