This algorithm holds indicators for trading momentum, it does not contain a strategy!
a = close - open <br />
b = close - open // one bar prior to a
c = close - open // one bar prior to b
d = close - open // one bar prior to c
numerator = ( a + (2 * b) + (2 * c) + d ) / 6
e = high - low // of bar a
f = high - low // of bar b
g = high - low // of bar c
h = high - low // of bar d
denominator = ( e + (2 * f) + (2 * g) + h) / 6
Current period selected = 20
RVI = SMA of numerator for selected period /
SMA of denominator for selected period
i = RVI // one bar prior
j = RVI // one bar prior to i
k = RVI // one bar prior to j
SIGNAL_LINE = (RVI + (2 * i) + (2 * j) + k) / 6
RSI = 100-100/(1+RS)
RS = Average gain of up periods w specifed period/
Average loss of down periods during a specified period
1. Moving average
2. Upper band at K times an N-period standard deviation
3. Lower band at K times an N-period standard deviation
CCI = Price - MA / 0.015 x D