Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Herrick Payoff Index (HPI) for Amibroker (AFL)

Rating:
3 / 5 (Votes 3)
Tags:
amibroker, oscillator

The Herrick Payoff Index (HPI) uses volume, open inerest, and price to signal bullish and bearish divergences in the price of a future or options contract. The use of open interest in the calculation of the HPI means the indicator can only be used with futures and options.

More info here…

Indicator / Formula

Copy & Paste Friendly
function HPI( MultFactor, PercentMove )
{
 M = ( H + L ) /2;
 My = Ref( M, -1 );

 I = abs( OpenInt - Ref( OpenInt, -1 ) );
 G = Max( OpenInt, Ref( OpenInt, -1 ) );
 
 K = PercentMove * Volume * ( M - My ) * ( 1  + sign( M - My ) * 2 * I / G );

 //return AMA2( K, MultFactor / 100000, ( 1 - MultFactor ) / 100000 );
 
 return AMA( K, 1/MultFactor )/100000;  	


}

OI = C;

Plot( HPI( 20, 100 ), _DEFAULT_NAME(), ParamColor("Color", ColorCycle ) );

1 comments

1. ghost2k

Very exciting

Leave Comment

Please login here to leave a comment.

Back