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

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



PureBytes Links

Trading Reference Links

Thank you very much, Steve.

The style argument makes it perfect now.

C.

--- In amibroker@xxxxxxxxxxxxxxx, "Steve Dugas" <sjdugas@xxxx> wrote:
> Hi Charles,
> 
> bBot, bTop and indClose are plotting correctly. Plotforeign 
statment appears to be using its own scale, but if you add Style 
argument it falls into place. Try this code to see:
> 
> 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, "Ind " + baseIndustry, colorWhite, styleDots);
> PlotForeign( baseIndustry, "Industry " + baseIndustry, colorRed, 
styleCandle );
> 
> 
> Steve
>   ----- Original Message ----- 
>   From: firstview2000 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Monday, October 06, 2003 2:18 AM
>   Subject: [amibroker] scaling issue with PlotForeign() and 
bollinger bands
> 
> 
>   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 
>        
>        
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   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 the Yahoo! Terms of 
Service.



------------------------ 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/