[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] help with coding formula



PureBytes Links

Trading Reference Links

/*  I put an absolute on y to remove the huge spikes */
T = Param("Period",200,2,1000,1);
htf = HHV(H,T);
ltf = LLV(L,T);
x = (htf - Close)/htf;
y = abs(ltf - Close)/ltf;
momentum = y/ (y + x);
Plot(momentum,"Momentum", colorRed, styleLine | styleThick);

-------------- Original message -------------- 
From: "xxxringop" <xxxringop@xxxxxxxxx> 
I need help coding the following formula:

htf = The high over the past 200 trading days

ltf = The low over the past 200 trading days

x = (htf - close)/htf
y = (ltf - close)/ltf

momentum = y/ (y + x)

I would like to be able to plot it on a graph and set up as an 
exploration.

Thanks