Technical Functions

Technical Functions

Scan Syntax Reference: Technical Functions

There are several arithmetic functions that you can you can use to modify the expressions in your scan. For more information on writing scans using these and other types of scan syntax, please see our Support Center article on Writing Scans.

Absolute Value (AbsVal)

The Absolute Value of the expression.

Syntax:

  • AbsVal(exp)

Parameters:

  • exp - expression

Example:

  • [AbsVal(MACD Hist(12,26,9)) > 3]

Maximum Value (Max)

The highest value of the expression over the specified time period.

Syntax:

  • Max(nPeriod, exp)

Parameters:

  • nPeriod - Number of periods
  • exp - expression

Example:

  • [Max(253,close) > 99.9]

Minimum Value (Min)

The lowest value of the expression over the specified time period.

Syntax:

  • Min(nPeriod, exp)

Parameters:

  • nPeriod - Number of periods
  • exp - expression

Example:

  • [Min(253,close) < 99.9]

Percent Change (PctChange)

The percentage change of the expression over the specified time period.

Syntax:

  • PctChange(nPeriod, exp)

Parameters:

  • nPeriod - Number of periods
  • exp - expression

Example:

  • [PctChange(10,close) > 15]

Percent Diff (PctDiff)

The percentage difference between two expressions.

Syntax:

  • PctDiff(exp1, exp2)

Parameters:

  • exp1 - first expression
  • exp2 - second expression

Example:

  • [PctDiff(close,sma(50,close)) < 5]