Here the derivatives versions of the base indicators are described.
Introduction
These indicators express whether the base indicator is increasing or decreasing and at what rate.
They implement the concepts of derivative, gradient, tangent, incline, steepness...
These are such indicators:
Slope
Angle
Momentum
Rate of Change (ROC)
Function Composition
For greater flexibility, the derivative indicators are not applied directly to a base indicator per se, but to its Moving Average (MA):
derivative (MA (base indicator() ))
This way, the derivative can be calculated on a smoothed version of the indicator.
As explained earlier, if you want to apply the derivative directly to the base indicator, just select:
MA lookback = 1
Interpretation
All the derivatives indicators have common interpretation:
derivative > 0 <=> the base indicator is increasing
derivative < 0 <=> the base indicator is decreasing
derivative ≈ 0 <=> the base indicator is at its maximum or minimum and is moving sideways
The greater the absolute value, the greater the rate at which the base indicator is changing.
All this comes with a delay, given by the lookback period. The greater the lookback, the greater the delay.
Signals
The signals implied by the derivatives indicators depend on the underlying base indicator and, ultimately, on you.
Input Parameters Order
Being a function composition, the input parameter for the derivative, which is a lookback period, comes before the MA lookback,
which in turn comes before the input parameters of the indicator it is applied to.
Example:
Slope lookback (12)
MA lookback (5)
ATR lookback (14)
Derivatives Appear in the Indicators Branch
All indicators expressing derivatives have output values completely different than their input.
In particular they are not within the price range.
As such, they cannot be plotted together with prices, in the same graph.
That's why they are always listed in the Indicators branch of the Tree in the User Interface,
even for those indicators whose base indicator is an overlay.
This is the distinction between overlays and indicators, by definition.
For instance, the Bollinger Bands are an overlay, and the base indicator is listed among the overlays.
However, in the Indicators branch of the Tree, the Bollinger Bands appear again, listing the derivatives, which will be plotted in a different chart.
Graph
For all the following sections, please refer to this graph.
You Can't Look Into the Future
When dealing with the stock market, you can see into the past but not into the future.
For a certain day, you know the data only for previous days, not for the following days.
If you have two quantities, one y1 known at an instant in time t1 and another y2 at a later instant t2, and you need both of them for a calculation,
you can use both of them only in t2, not t1, because they are both known only at instant t2 but not at instant t1.
So you can perform the calculation only in t2, not t1.
Whatever formula you are applying, you can apply it only in t2.
It is the slope of the line passing through (t1, y1) and (t2, y2), which is a secant to the curve.
It corresponds to the trigonometric tangent of the angle α.
In mathematical analysis it is called difference quotient.
Note that in mathematical analysis such a slope would be referred to (t1, y1),
but we always stress the fact that in a stock market you can only see in the past, not in the future.
So, if you are in the instant of time t2, you can compute the given formula. But if you are in the instant of time t1, you simply can't.
When Δt approaches 0, it becomes the slope of the geometric tangent line to the curve at point (t2, y2).
In this case, it would be the derivative (the tangent) of the curve.
From there it is converted to degrees or gradians, according to the selection made by the user in the Indicators tab,
through the Angles in radio buttons.
There are 90 degrees and 100 gradians in the right angle.
Description
This is the angle of the line passing through (t1, y1) and (t2, y2), which is a secant to the curve.
It corresponds to the angle α.
When Δt approaches 0, it becomes the angle of the geometric tangent line to the curve at point (t2, y2).
Output Bounds
The bounds differ according to the selection made for their units of measure:
degrees ∈ [-90, +90]
gradians ∈ [-100, +100]
This holds true in particular for input parameters.
So if an input parameter of an algorithm is an angle, the maximum and the minimum value you can input depend on the choice about the units of measure,
namely ±90 for degrees or ±100 for gradians.
Some examples:
It is simply the difference between two input values, distant lookback periods from each other.
Output Bounds
The Momentum has no bounds:
Momentum ∈ (-∞, +∞)
Rate of Change (ROC)
Formula
The formula is:
y2 - y1
ROC(t2) = 100 ⋅ ─────────
y1
Description
It is the percentual difference between two input values, distant lookback periods from each other.
Output Bounds
The Rate of Change (ROC) has no bounds when applied to positive and negative quantities:
ROC ∈ (-∞, +∞)
but when applied only to positive quantities it is bounded:
ROC ∈ [-100, +∞)
Input Values ≈ 0, Overlays and Indicators
Note that when
y1 = 0
the defining function is no longer valid.
This is why the ROC in the derivative section is listed only for overlays but not for indicators.
Overlays always have positive values, never approaching 0.
Indicators usually can take on any value.