Modifiers

Modifiers, as the name suggests, modify other values. For example, instead of taking the value of the RSI, or the closing price, as is, you can derive a new value from that RSI/closing price. Modifiers allow you to take the average of another value, or, lookup past values. You can also combine modifiers, e.g. taking the maximum of the average of the RSI over a number of candles. This section documents all available modifiers

Average

The "Average" modifier take the average of the value over the last N candles. You can choose from various averages: Exponential Moving Average, Hull Moving Average, and Simple Moving Average.

Direction

The "Direction" modifier can be used to check if values are trending upwards or downwards. It examines the last N values. Then:

  • If the values are increasing, a positive number is returned.
  • If the values are decreasing, a negative number is returned.
  • In all other cases, zero is returned.

For example, to check that the closing price of the last 10 are trending upwards, you can use: Direction(10) of Closing Price > 0.

Look Back

The "Look Back" modifiers is used to refer to a previous value (that of the specified number of candles back in time).

Minimum / Maxmimum

Maximum/Minimum: given a configurable length N, it will return the maximum/minimum value encounter within the last N candles.

Sign

The "Sign" modifier can be used to check if values are all positive or negative. It examines the last N values. Then:

  • If the values are all positive, a positive number is returned.
  • If the values are all negative, a negative number is returned.
  • In all other cases, zero is returned.

Stage Value

The "Stage Value" modifier can be used in multi-stage scripts to refer to any value of a previous stage. For example, Stage value(1) of Closing Price represents the closing price at the time that the first stage locked in.

Standard Deviation

The "Standard Deviation" modifier takes the standard deviation of the value over the last N candles.