Tuesday, August 28, 2012

Indicator: RSI Daily on a Min Chart

If you haven't already, it is extremely helpful to use daily indicators and overlay it on minute charts. It gives off more accurate signals. The top chart indicator is an RSI daily on a 5min chart and the bottom chart indicator is just RSI daily on a daily chart. You can take better advantage of the daily movements.

*RSI* is very useful in equity not much for futures.




 



Inputs: Length(9);
Variables: Counter(0), DownAmt(0), UpAmt(0), UpSum(0), DownSum(0), UpAvg(0), DownAvg(0), RSI(0);
var : Dindex(0), PreUpAvg(0), preDownAvg(0);


if date <> date[1] then {
Dindex = dindex + 1;
PreUpAvg = UpAvg[1];
preDownAvg = DownAvg[1];
}


If CurrentBar > 1 AND Length > 0 Then {
UpAmt = dayClose(0)-dayClose(1);
If UpAmt >= 0 Then
DownAmt = 0;
Else {
DownAmt = -UpAmt;
UpAmt = 0;
}
if Dindex <=1 Then {
UpAvg = 1;
DownAvg = 1;
}
Else {
UpAvg = (PreUpAvg * (Length - 1) + UpAmt) / Length;
DownAvg = (preDownAvg * (Length - 1) + DownAmt) / Length;
}
}


If UpAvg + DownAvg <> 0 Then
RSI = 100 * UpAvg / (UpAvg + DownAvg);
Else
RSI = 0;


plot1(RSI,"RSI");
PlotBaseLine1(30, "기준선 30", gray);
PlotBaseLine2(70, "기준선 70", gray);

No comments:

Post a Comment