PureBytes Links
Trading Reference Links
|
As I said there may have been an error as I type it on the fly. I was using
candles to plot the histogram of RSI. This will use your candle set colours
in preferences for the values.
Here is the corrected code
xO = 0;
xC = RSI(14) - 50;
xH = Max(xO,xC);
xL = Min(xO,xC);
PlotOHLC( xO,xH,xL,xC,"" , colorBlack, styleCandle);
Cheers,
Graham
http://groups.msn.com/asxsharetrading
http://groups.msn.com/fmsaustralia
-----Original Message-----
From: Dave Merrill [mailto:dmerrill@xxxxxxx]
Sent: Thursday, 4 December 2003 9:43 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Histogram centered around a non-zero value
Thanks for the ideas; the second one works well. I rewrote it slightly like
this:
r = RSI(14);
Plot(r - 50, "", colorwhite, stylehistogram);
bgcolor = colorLightGrey;
Plot(r, "", bgcolor, stylehistogram+styleNoLabel+styleNoRescale);
Does anyone know if we can access the colors set up in preferences through
AFL? That'd be a better way to go than hard coding the background color. I
know about the Prefs function, but as far as I can see, it doesn't include
getting back preferred colors.
I couldn't figure out what you were up to with your first idea. Not what I'm
looking for as written, but maybe there's something in there. Doesn't matter
though, since the second one works fine, and is simpler too.
Thanks again,
Dave
> There are 2 ways you could achieve this
>
> xO = 50;
> xC = RSI(14) - 50;
> xH = max(xO,xC);
> xL = min(xO,xC);
> PlotOHLC( xO,xH,xL,xC,"" ,colorblue,stylecandle);
>
> Or
>
> Plot( RSI(14)-50,"",colorwhite,stylehistogam);//your backghround
> colour Plot( RSI(14), "", colorblue, stylehistogram);
>
>
> I have just typed these out, hoping they work, but may have some typo
> errors
>
> Cheers,
> Graham
>
>
> What's the easiest way to plot something that looks like a histogram,
> but has the bars extending up and down from some value other than
> zero? For instance, suppose you wanted to plot RSI above and below 50.
> You could subtract 50 and use a normal histogram, but that makes the
> readings in the title, tooltip and to the right of the graph wrong.
>
> Is there a simple solution I'm not thinking of?
>
> Thanks,
>
> Dave
------------------------ 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/
------------------------ 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/
|