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

[amibroker] scaling issue with PlotForeign() and bollinger bands



PureBytes Links

Trading Reference Links

When reviewing stocks, I'd like to plot their industry indices as an 
indicator. In the industry graph, I tried to plot it bollinger bands 
as well.

I used the following coding, but found out the BB lines and industry 
index graph cound not be align properly. The reason seems to be 
different scaling, as I can see the values of BB and index close are 
correct.

baseIndustry = GetBaseIndex();

indClose = Foreign(baseIndustry, "Close");

bBot = BBandBot( indClose, 20, 2 );
bTop = BBandTop( indClose, 20, 2 );

Plot ( bBot, "BB Bot", colorBlue ); 
Plot ( bTop, "BB Top", colorBlue ); 


Plot (indClose, "Industry " + baseIndustry, colorRed);
PlotForeign( baseIndustry, "Industry " + baseIndustry, colorRed );

Any help is appreciated.

Charles




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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