Determines whether todays price action represents an (up or down) trend, (up or down) gap, or an (inner or outer) range.
Returns an integer depending on the classification of the past two days price action. Where the integer returned is in accordance with the following key:
= 1= 2= 3= 4= 5= 6The classification of the price movement will be required by the Directional Movement Indicator (DMI) approach in comparing the previous days price action to todays price action.
Here we detail explicitly what we mean by the terms trend, gap and range. We compare the range of the todays price with yesterdays range of prices and classify the price dynamics according to the following categories:
(todaysHigh > yesterdaysHigh) and (todaysLow > yesterdaysLow)(todaysHigh < yesterdaysHigh) and (todaysLow < yesterdaysLow)(todaysHigh > yesterdaysHigh) and (todaysLow > yesterdaysHigh)(todaysHigh < yesterdaysLow) and (todaysLow < yesterdaysLow)(todaysHigh ≥ yesterdaysHigh) and (todaysLow ≤ yesterdaysLow)(todaysHigh ≤ yesterdaysHigh) and (todaysLow ≥ yesterdaysLow)where:
Remarks:
| Exception Type | Condition |
|---|---|
| ArgumentException | Thrown if any of the parameters todaysHigh, todaysLow, yesterdaysHigh or yesterdaysLow is a strictly negative number. |
DirectionalMovementIndicator Class | WebCab.COM.Finance.Trading.Indicators Namespace