Hello,
I'm trying to build the TDI indicator in OmniTrader but I'm having a problem matching up OmniTrader's RSI with MT4s (which is the base of the TDI indicator).
I've look around the net and found the equation for RSI:
http://web.streetauthority.com/terms/r/rsi.asp
http://stockcharts.com/school/doku.p...ngth_index_rsi
When I a manual calculation for RSI it doesn't match MT4s level.
Does anyone have an idea why or what MT4 is doing different in their RSI calculation?
Here's an example:
RSI(3)
to keep it simple, but I've tested with longer periods and get similar results.
Close of bar one: 1.46221
Close of bar two: 1.46378
Close of bar three: 1.46378 (same as close of bar two)
According to the actual RSI equation:
Calculate all the up and down days:
1.46221 - 1.46378 = -0.00157
1.46378 - 1.46378 = 0
Average of total up days = 0 / 3 = 0
Average of total down days = 0.00157 / 3 = 0.000523
0(avg up days) / 0.000523(avg down days) = 0.000523
Add 1
1 + 0.000523 = 1.000523
100 / 1.000523 = 99.9477
100 - 99.9477 = 0.05....
So the RSI(3) for the marked day should be about 0 but MT4 is showing 27.8084
Anyone have an idea how it calculated 27.8084?
Any insight would be greatly appreciated. I've spent like 10hrs now trying to duplicate the TDI in OT and it looks like the RSI calculation is the issue. If I can figure out how it's getting 27.8084 I should be able to code OT to duplicate it.
Thank you,
Lain
I'm trying to build the TDI indicator in OmniTrader but I'm having a problem matching up OmniTrader's RSI with MT4s (which is the base of the TDI indicator).
I've look around the net and found the equation for RSI:
http://web.streetauthority.com/terms/r/rsi.asp
http://stockcharts.com/school/doku.p...ngth_index_rsi
When I a manual calculation for RSI it doesn't match MT4s level.
Does anyone have an idea why or what MT4 is doing different in their RSI calculation?
Here's an example:
RSI(3)
to keep it simple, but I've tested with longer periods and get similar results.
Close of bar one: 1.46221
Close of bar two: 1.46378
Close of bar three: 1.46378 (same as close of bar two)
According to the actual RSI equation:
Calculate all the up and down days:
1.46221 - 1.46378 = -0.00157
1.46378 - 1.46378 = 0
Average of total up days = 0 / 3 = 0
Average of total down days = 0.00157 / 3 = 0.000523
0(avg up days) / 0.000523(avg down days) = 0.000523
Add 1
1 + 0.000523 = 1.000523
100 / 1.000523 = 99.9477
100 - 99.9477 = 0.05....
So the RSI(3) for the marked day should be about 0 but MT4 is showing 27.8084
Anyone have an idea how it calculated 27.8084?
Any insight would be greatly appreciated. I've spent like 10hrs now trying to duplicate the TDI in OT and it looks like the RSI calculation is the issue. If I can figure out how it's getting 27.8084 I should be able to code OT to duplicate it.
Thank you,
Lain