WebCab Technical Analysis for COM v1.1

Filters.PriceActionOverPeriod Method 

Evaluates the Price Action Indicator (PAIN) of an asset for a given trading period.

public double[] PriceActionOverPeriod(
   double[] high,
   double[] low,
   double[] open,
   double[] close
);

Parameters

high
A double array where the first term is the traded high on the most recent period, the second terms is the traded high of the previous periods and so on.
low
A double array where the first term is the traded low on the most recent period, the second terms is the traded low of the previous periods and so on.
open
A double array where the first term is the traded open on the most recent period, the second terms is the traded open of the previous periods and so on.
close
A double array where the first term is the traded close on the most recent period, the second terms is the traded close of the previous periods and so on.

Return Value

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.

Remarks

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.

Evaluation

The PAIN indicator is evaluated by the following formula:

PAIN = ( (close - open) + (close - high) + (close-low) ) / 2

where:

  1. (close - open) - defines Intra-Day Momentum
  2. (close - low) - defines Late Selling Pressure (LSP)
  3. (close - high) - defines Late Buying Pressure (LBP)
where 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.

Exceptions

Exception TypeCondition
ArgumentExceptionThrown 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.

See Also

Filters Class | WebCab.COM.Finance.Trading.Indicators Namespace | PriceAction - evaluates the Average price for a single period.