I've attempted to put together an indicator to display the average of 
the monthly,weekly,and daily RSI. At first glance it seemed to come 
out ok,but when I used the bar at the bottom right of the screen to 
scroll back in time,I noticed that the new indicator changes when I'm 
scrolling while with a regular RSI,or any other indicator for that 
matter,the values stay the same for any particular day even though 
they are scrolling by on the screen.( I'm not sure if I'm explaining 
this very clearly.)

For instance, say the value is 16.33 for aug. 1 2008. If I use the 
bar to scroll back , the indicator line changes as it's scrolling and 
if I click on aug 1 again the value will be different say 7.29. Also 
I calculated the average of the last day shown manually and it does 
not match the value shown by the indicator.It's my first attempt 
using "timeframe", so I'm still trying to get the hang of it.Thanks 
for any help you can give. Here's the code I wrote...

SECTION_BEGIN("avg of m,w,d rsi");
TimeFrameSet(inMonthly);//switch to monthly time frame 

m_rsi=RSI(2);//monthly rsi(2)

TimeFrameRestore(); // restore time frame to original(daily) 




TimeFrameSet(inWeekly);//switch to weekly time frame 

w_rsi=RSI(2);//weekly rsi(2)

TimeFrameRestore(); // restore time frame to original(daily)


Plot((m_rsi + w_rsi +RSI(2))/3,"avg. m-w-d rsi",colorWhite);
_SECTION_END();

Reply via email to