Saturday, November 19, 2011

The JK HiLo Index - prorealtime formula proposal

This is the proposal of ProReal Time formula

variabiles: n,m


// The JK HiLo Index, by Jay Kaeppel, issue of October, 2011, Stock & commodities magazine
// passages read in the article (classical formula)

// A = daily total issues traded
// B= daily new highs
// C = daily new lows
// D = Lesser of B and C
// E = D/A*100
// F = 10-day simple moving average of E = SMA(E;10)
// G= if F >= 2.15 or <= 0.40 then G = F, else G = 1.00
// H = B/ (B+C)
// I = 10-day simple moving average of I = SMA(H;10)
//  J = G*I*100


// watch this http://books.google.it/books?id=IjuoD5yJs8YC&pg=PA202&dq=high+low+logic+index&hl=it&ei=HPfETuGYEcfQ4QTGx4iuDQ&sa=X&oi=book_result&ct=result&resnum=3&ved=0CEAQ6AEwAg#v=onepage&q=high%20low%20logic%20index&f=false

// page 202
// in a first moment, this indicator cannot be used in ProRealTime (since we cannot compute each single component of a market index like DAX or Dow), but with adaptation we can reach a result

A1 = n
//n = 52. In this formula A1 = A (used A1 because desk gives an output that is not pacific for me)

// ==> this indicator cannot be applied to FTSEMIB, but only to DAX, DOW, etc..
//B - daily new highs
B = 0
for i = 1 to n
    if close[i] > high[i+1] then
        B = B+1
    else
        B = B+ 0
    endif
next



// C - daily new lows
C=0

for i = 1 to n
    if close[i] < low[i+1] then
        C = C+1
    else
        C = C+ 0
    endif
next

D = MIN(B,C)



E1 = D/A1*100
//E could be a function in Pro Real Time Desk, so we use E1

F = Average[m](E1)
// default m = 10

if F<=0.40 or F>= 2.15 then
    G = F
else
    G = 1
endif

H = B / (B+C)

I = average[m](H)
J = G*I*100

return j

**++end of formula***

Comment:
Output of J is not the same as expected (it's range is not from 1 to 100)
A reason of this could be a not right approach in defining variabile "A": who could help me?
In Easylanguage I've seen (correctly) the use of variables considering ALL the components of index, that is clearly impossible for ProRealTime: I'm afraid this is an impasse..

However since this indicator is set upon a period of 52 (quite long), I'm laso afraid it couldn't be really useful  for a short trading.
=> REJECTED!!
Any source

No comments:

Post a Comment