[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Puzzelment - RSI of "Foreign" within TimeFrameSet ?



PureBytes Links

Trading Reference Links


1st, thanks to the response of how to RSI a "Foreign" ticker.
However, 
When I set the TimeFrame to weekly it all fall's apart for me. 
After setting up this simple test (code below) I don't know what to
think. 
I must be in error somewhere. Please test the code if one has time &
get me straight.
1. Viewing the ^SPX  in Daily mode. (for any other symbol - change the
SetForeign to match)
2. I would expect the following code to produce 2 exact Plots. It does
not.
Is it because I am doing a SetForeign on the Symbol being viewed ?

Thanks, 	Jack

_SECTION_BEGIN("RSI_SPtest");
TimeFrameSet(inWeekly);
 /* Simple RSI of current symbol (^SPX) in Weekly TimeFrame */
wRSI = RSI(8); 
/* SetForeign to ^SPX  - Still same Time Frame */
SetForeign("^SPX");  
SetFrgnRSI= RSI(8);     
RestorePriceArrays();
TimeFrameRestore();
/* TimeExpand each of the above RSI's for Plot*/
TXwRSI = TimeFrameExpand(wRSI, inWeekly);    
TXSetFrgnRSI = TimeFrameExpand(SetFrgnRSI, inWeekly);
 /* PLOT each of the Expanded RSIs */ 
Plot(TXwRSI , "wRSI", colorBlack, styleLine);   
Plot(TXSetFrgnRSI, "SetFrgnRSI", colorWhite, styleLine);
_SECTION_END();





------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/