Numeric input

By using an input, you can assign a formula that results in a numeric value to a name. You can then reference that name (instead of the formula) throughout your study to retrieve its corresponding formula's value.

Inputs provide tremendous flexibility in that once you assign a formula to an name, to change its value throughout your study, you only have to change it in one place as opposed to every place you use it. This is especially helpful when using lengthy calculations in your formulas. Another powerful feature of numeric inputs is that they allow trading strategies to be optimized so that the most profitable historical values are used when applying your trading strategy.

  Input values cannot use variables.

Example

The example below uses a declaration statement to assign the formula (Close - Open) to the input MyInput. This allows you to reference MyInput to represent the calculation of (Close - Open) throughout your study.

Input: MyInput(Close - Open);

If MyInput > 1 then Buy at Close + MyInput Point Stop;

If you do not create the input MyInput, your statement would become more lengthy as you would need to reference (Close - Open) for every instance of MyInput as illustrated below.

If (Close - Open) > 1 then Buy at Close + (Close - Open) Point Stop;