Basic Indicators

Top  Previous  Next

To create a Basic Indicator, select "Indicators" on the left and click the "New" button. This will bring up the new indicator dialog:

 

newindicator

 

Name for Code

This is the name which will be used to access the indicator in a script. In this case we named our indicator averageClose. We can use this like a variable in our scripts, with or without indexing. You can use any name here that complies with the rules for creating variables.

 

Using the indicator name without indexing refers to the most recent available data, today. Example:

 

IF averageClose > averageClose[1] THEN

 

OR

 

IF instrument.averageClose > instrument.averageClose[1] THEN

 

Type

There are many built-in indicators listed below. Each of these may require Parameter values, so set these up first if applicable.

 

Calculated

 

See Calculated Indicators for more information

Bar Value

 

the Value assigned to the indicator like "High + Low / 2"

Bar History Value

 

the historical Value of the indicator

Simple Moving Average

 

a Simple Moving Average of the Value

Exponential Moving Average

 

an Exponential Moving Average of the Value that primes with a simple moving average of the Value, and then uses the ema smoothing constant thereafter.

EMA Alternate

 

an Exponential Moving Average of the Value that primes with the Value itself on bar 1 and uses the ema smoothing constant only.

Keltner Upper

 

the upper channel of the keltner band. Uses an atr based channel width from an ema. Both the atr and ema are computed in the alternate fashion, with the bar 1 values as the prime value.

Keltner Lower

 

the lower channel of hte keltner band.

Bollinger Upper

 

the upper channel of the bollinger band. Uses a standard deviation based channel width from an ema. Both the sd and ema are computed in the alternate fashion, with the bar 1 values as the prime value.

Bollinger Lower

 

the lower channel of the bollinger band

MACD - MA Convergence Divergence

 

the MACD for the value. The short moving average minus the long moving average. Uses the simple moving average to prime the short and long exponential moving averages.

MACD Alternate

 

the alternate version of the macd, using the bar 1 value as the prime value rather than using a simple moving average.

Average True Range

 

the EMA of the True Range. Computes a simple moving average to start, then an exponential moving average.

Average True Range Simple

 

the SMA of the True Range

Standard Deviation

 

the Standard Deviation of the value of N bars

Standard Deviation Log

 

the Standard Deviation of the log of the ratio bar change over N bars

Highest Value

 

the Highest Value for N bars

Lowest Value

 

the Lowest Value for N bars

Stochastic Oscillator

 

the %K Stochastic Value for N bars

Stochastic Oscillator Slow

 

the %D Stochastic Value for N bars

Stochastic Oscillator Full

 

a smoothed Stochastic

Accumulation/Distribution

 

a volume-based momentum indicator

ADX - Average Directional Index

 

J. Welles Wilder's trend strength indicator

DI+ - Positive Directional Indicator

 

J. Welles Wilder's Positive Directional Indicator

DI- - Negative Directional Indicator

 

J. Welles Wilder's Negative Directional Indicator

RSI - Relative Strength Index

 

J. Welles Wilder's momentum indicator

Parabolic SAR

 

J. Welles Wilder's entry and exit indicator

 

 

Value

The Value is the basis for the computation of the Indicator. The choices are:

 

Open

 

the open for the bar

High

 

the high for the bar

Low

 

the low for the bar

Close

 

the close of the bar

High + Low /  2

 

the average of the high and low

High + Low + Close /  3

 

the average of the high, low, and close

OHLC / 4

 

the average of the open, high, low, and close

Volume

 

the volume for the bar

Open Interest

 

the open interest for the bar (futures only)

Unadjusted Close

 

the unadjusted close for the bar

Extra Data 1

 

the value of the extra data 1 field for the bar

Extra Data 2

 

the value of the extra data 2 field for the bar

Not Applicable

 

Used for cases like the Average True Range, which do not require a value input

 

For example, a "Simple Moving Average" indicator that used a value of "High" would be a simple moving average of the instrument's high.

 

Time Frame

Reserved for future use.

 

Parameters

Most types of indicators require numeric constants for their computation. For instance, the MACD indicator requires the days for the long and short moving averages. You can select from a list of Parameters that you have created, or you can choose "Enter Value" and enter a constant value in the box to the right.

 

For many indicators, there is a final option called "Smoothing." This option will smooth the indicator by the bars indicated, using the EMA formula. If you enter 1 for the number of bars to smooth, there will be no smoothing.

 

Example: To create an RSI indicator with a smoothed signal RSI line, create two indicators, one with smoothing, and one without.

 

Scope

Set the scope based on what blocks and scripts need access to this indicator. If you set to Block scope (default) only the scripts in the block will have access. If you set to System scope, then all scripts in all block in the system will have access. When System Scoped, for other blox to access this indicator an IPV Series variable must be declared in the other blox with the Defined Externally in another Block checked. This will tell the parser that the variable is defined elsewhere.

 

Plots on Trade Graph

Check to have the indicator plotted on the trade chart. When you plot an indicator on the trade graph, you can select the Display Name, the Color, and whether the indicator should be offset by one day.

 

Displays on Trade Graph

Check to have the indicators value displayed in the right panel of the trade chart, as the cross hairs are moved by the mouse or cursor. By clicking on the indicator name on the trade chart, plotting can be dynamically enabled or disabled. The indicator can also be removed from the chart.

 

Offset Plot by One Day

This option shifts the indicator ahead one day. This is useful when your indicator is used for stop or limit orders, and you want the indicator to visually cross the bar as an indication your order was hit. This is only a visual change on the graph, and does not change the calculations or results.

 

Graph Area

The text in this field will determine where the indicator is plotted. If you select "Price Chart" the value will be plotted on the price chart area. If you select any other text value, it will create a new chart and put the indicator there. You can have multiple indicators on the same chart area.

 

Graph Style

Select a graph style for the plot.

 

Notes on Priming

The maximum amount of bars required to prime this indicator plus one will be added to overall priming. If the indicator is a 10 day moving average, then the first day scripts will run is day 11. Overall priming is the maximum bars required for indicators plus one, plus the maximum lookback parameter plus one.