PureBytes Links
Trading Reference Links
|
> If I want to use and look at the EOD value of RSI on a 60 minute
> chart so I changed the Price field to CloseD(1) but the RSI value
> seems to be different if I look at a 15 minute chart vs. a 30 minute
> which is different than the value in a 60 minute (etc.) Why?
RSI gets called, and calculated, on every bar. If you call RSI
on an EOD chart, it gets called once per day. If you call it on
a 60min or 15min chart, it gets called 7 or 27 times per day (for
the SP), with the same value of CloseD(1) for each bar.
Since RSI uses the history of bars you called it with to
calculate the RSI value, calling it with 7 bars of price X is not
the same as calling it with 1 bar of price X. That's why you get
the different values.
You could try calling it only once per day (something like "if
Date>Date[1] then MyRSIval = RSI(whatever)"), but that won't
work. RSI is a Series function. That means it gets called on
every bar whether you think you're calling it or not. That's how
it makes sure it has the full history of bars to work with.
Looking at the RSI code, it really does access the past history,
so it would not be very easy to convert it to a Simple function
that got called once per day on an N-minute chart. It's possible
-- you'd save the recent history in an array instead of using the
built-in bar history -- but messy.
Might be best to add a daily-bar price series to your chart
(hidden if you don't want to see it), apply the RSI indicator to
that series, and display it on your N-minute chart. Be aware
that some things can get a little confusing with multiple series;
for example the MaxBarsBack value applies to ALL series, so if
MBB = 20, that means your indicators won't start calculating
until 20 bars have completed in ALL series, including your daily
series.
Gary
|