RSI Time Frames

I am trying to build an RSI composite model. I want to use three different look backs, say 5, 10 and 20. Then if all three are > 70 return +3 and if all three are less than 30 return -3…and all combos in between. What is the best way to script this?

Hey Dan,

Try this in a Show View or Watchlist column:

//Set the RSI conditions;
R1 = RSI(BARS=5)>70;
R2 = RSI(BARS=10)>70;
R3 = RSI(BARS=20)>70;
R4 = RSI(BARS=5)<30;
R5 = RSI(BARS=10)<30;
R6 = RSI(BARS=20)<30;
//Sum the values, multiplying the < 30 by -1;
R1+R2+R3+(R4*-1)+(R5*-1)+(R6*-1)

Workbook attached.

RSI-Composite.owb (45.8 KB)