Dear Fellow traders,
I am new to this site; been experimenting for over a year with different indicators on a demo account. Found something called Cutler's RSI, comparing it with Wilder's Original indicator, this modified version appears more robust apparently because Wilder's RSI is calculated by determining the difference between the open and the close; Cutler's RSI is calculated by determining the difference between the previous bar's close and the current close (the net change!).
Can anyone help me code it in MT4?
THANKS,
ROB
[email protected]
http://www.aspenres.com/Documents/As...CutlersRSI.htm
CutlersRSI(SERIES, Periods=14, Bate=6)=begin
SumUp = 0
SumDown = 0
RS = 1
currentPrice = NONUM
previousPrice = NONUM
difference = 0
for i = -1 to (Periods - 2) begin
currentPrice = GetPrice($1, Bate, i, Periods)
previousPrice = GetPrice($1, Bate, (i + 1), Periods)
difference = currentPrice - previousPrice
if difference > 0 then SumUp = SumUp + difference
if difference < 0 then SumDown = SumDown + abs(difference)
end
if SumDown > 0 then RS = SumUp / SumDown
retval = GetRS(RS)
retval
end
<TABLE class=whs1 cellSpacing=0 width="100%" x-use-null-cells><TBODY><TR class=whs3 vAlign=top><TD class=whs12 width="20.67%">Parameters
</TD><TD class=whs13 width="79.32%">SERIES
The SERIES directive makes this formula available as a Formula Study. SERIES refers to the instrument in a chart. SERIES does not become a study parameter.
Periods
The number of periods, or length, of the RSI. The default is 14.
Bate
The Bate parameter determines what price (open, high, low, last, bid, ask, etc.) is used in calculating. The default is 6, or BATE_CLOSE.
</TD></TR><TR class=whs3 vAlign=top><TD class=whs12 width="20.67%">
</TD><TD class=whs13 width="79.32%">
</TD></TR><TR class=whs3 vAlign=top><TD class=whs12 width="20.67%">Return Value
</TD><TD class=whs13 width="79.32%">Cutler's RSI
</TD></TR></TBODY></TABLE>
I am new to this site; been experimenting for over a year with different indicators on a demo account. Found something called Cutler's RSI, comparing it with Wilder's Original indicator, this modified version appears more robust apparently because Wilder's RSI is calculated by determining the difference between the open and the close; Cutler's RSI is calculated by determining the difference between the previous bar's close and the current close (the net change!).
Can anyone help me code it in MT4?
THANKS,
ROB
[email protected]
http://www.aspenres.com/Documents/As...CutlersRSI.htm
CutlersRSI(SERIES, Periods=14, Bate=6)=begin
SumUp = 0
SumDown = 0
RS = 1
currentPrice = NONUM
previousPrice = NONUM
difference = 0
for i = -1 to (Periods - 2) begin
currentPrice = GetPrice($1, Bate, i, Periods)
previousPrice = GetPrice($1, Bate, (i + 1), Periods)
difference = currentPrice - previousPrice
if difference > 0 then SumUp = SumUp + difference
if difference < 0 then SumDown = SumDown + abs(difference)
end
if SumDown > 0 then RS = SumUp / SumDown
retval = GetRS(RS)
retval
end
<TABLE class=whs1 cellSpacing=0 width="100%" x-use-null-cells><TBODY><TR class=whs3 vAlign=top><TD class=whs12 width="20.67%">Parameters
</TD><TD class=whs13 width="79.32%">SERIES
The SERIES directive makes this formula available as a Formula Study. SERIES refers to the instrument in a chart. SERIES does not become a study parameter.
Periods
The number of periods, or length, of the RSI. The default is 14.
Bate
The Bate parameter determines what price (open, high, low, last, bid, ask, etc.) is used in calculating. The default is 6, or BATE_CLOSE.
</TD></TR><TR class=whs3 vAlign=top><TD class=whs12 width="20.67%">
</TD><TD class=whs13 width="79.32%">
</TD></TR><TR class=whs3 vAlign=top><TD class=whs12 width="20.67%">Return Value
</TD><TD class=whs13 width="79.32%">Cutler's RSI
</TD></TR></TBODY></TABLE>