Evaluates the Price Action Indicator (PAIN) of an asset for a given trading period.
A double array where the first term is the PAIN of the asset on the most recent period considered, the second term is the PAIN on the period before that and so on.
An array is returned where the first term corresponds to the PAIN of the last trading period, the second term gives the PAIN on the previous trading period and so on.
The PAIN indicator is evaluated by the following formula:PAIN = ( (close - open) + (close - high) + (close-low) ) / 2
where:
(close - open) - defines Intra-Day Momentum(close - low) - defines Late Selling Pressure (LSP)(close - high) - defines Late Buying Pressure (LBP)close is the periods closing price, open is the periods opening
price, high is the highest traded price during the period and low
is the lowest traded price during the period.Remark: The PAIN indicator is consistent with the interpretation of Japanese candlestick patterns.
| Exception Type | Condition |
|---|---|
| ArgumentException | Thrown if the length of the array parameters high and low, open, close are not the same or if any elements of these two array's is strictly negative. |
Filters Class | WebCab.COM.Finance.Trading.Indicators Namespace | PriceAction - evaluates the Average price for a single period.