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

[amibroker] Re: MACD Histogram



PureBytes Links

Trading Reference Links


Thanks, Terry!

--- In amibroker@xxxxxxxxxxxxxxx, Terry <MagicTH@xxxx> wrote:
> You can always modify the built-in indicators with simple code 
like the
> change of color shown below.
> 
> Here's some code the demonstrates a little more. It shows the 
price with 52
> week highs marked in red (using stylearea) and your MACD with the 
up
> portions in green, down in red. I also added a signal line. You 
can change
> the periods used (12, 26, 9). If you use PARAM() statement they 
become more
> flexible (see documentation abour PARAM).
> 
> //-----------------------------------------------------------------
------
> 
> High52Week = HHV(C,252);
> WriteIf(High52Week == C,"Today is a 52 week high","");
> Plot(C,Name(),colorBlack,styleDots);
> Plot(IIf(High52Week == C,C,Null),"52 High",colorRed,styleArea);
>  
> cond = MACD(12,26);
> color = IIf(cond > 0,colorGreen,colorRed);
> Plot(cond,"MACD",color,styleHistogram+styleThick+styleOwnScale,-
1,1);
> Plot(MA(cond,9),"Signal 
Line",colorWhite,styledashed+styleOwnScale,-1,1);
> 
> //-----------------------------------------------------------------
------
> 
> Terry
> 
> > From: "stocktocker" <stocktocker@xxxx>
> > Reply-To: amibroker@xxxxxxxxxxxxxxx
> > Date: Sun, 09 Jan 2005 20:48:16 -0000
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: MACD Histogram
> > 
> > 
> > 
> > I tried this, but not sure of entering procedure - do I
> > use "Indicator Builder" here, how do I enter or modify the built-
in
> > code? Sorry for basic question - new to code writing...
> > 
> > TIA,
> > 
> > Mike
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, Terry <MagicTH@xxxx> wrote:
> >> Stylethick or you might even try stylearea, just be sure it's 
the
> > last Plot
> >> statement or it will cover up your other lines.
> >> 
> >> color = iif(cond > 0, colorgreen, colorred);
> >> Plot(cond,"cond",color,stylehistogram+stylethick);
> >> -- 
> >> Terry
> >> 
> >>> From: "sellcarad" <sellcarad@xxxx>
> >>> Reply-To: amibroker@xxxxxxxxxxxxxxx
> >>> Date: Fri, 07 Jan 2005 19:38:38 -0000
> >>> To: amibroker@xxxxxxxxxxxxxxx
> >>> Subject: [amibroker] MACD Histogram
> >>> 
> >>> 
> >>> 
> >>> Is there a way to modify the width of the bars for the built-in
> > MACD
> >>> histogram?  The bars are narrow lines which are difficult to 
read
> >>> when near zero. Also, is it possible to give the bars different
> >>> colors when above zero versus below zero?  Thanks for the help.
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 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
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> > 
> > 
> > 
> > 
> > 
> > 
> > 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
> > 
> > 
> > 
> > 
> > 
> > 
> >





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