- Topics: 66
- Replies: 617
- Posts: 683
I found a formula and created the following script in a Show View (one applied change the BARS option in the properties to change the lookback period from 10 days).
//Set Lookback period;
//Get directional change values;
U1 = IF(CHANGE() > 0, CLOSE()-CLOSE(1), 0);
D1 = IF(CHANGE() <=0, ABS(CLOSE()-CLOSE(1)),0);
//Sum changes over lookback period;
U2 = ACC(U1, BARS=$BARS, RANGE=Look Back Period);
D2 = ACC(D1, BARS=$BARS, RANGE=Look Back Period);
RMI = 100 * (U2 / (U2+D2));
When made into a Boolean true/false condition (eg RMI CrossesAbove 70) then it can be used in a watchlist or scan. Workbook attached.