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

[amibroker] Re: Changing MACD histogram colors



PureBytes Links

Trading Reference Links


Anthony,
Thanks a million... It works great

Dick H.

--- In amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso" <ajf1111@xxxx> 
wrote:
> _SECTION_BEGIN("MACD");
> 
> r1 = Param( "Fast avg", 12, 2, 200, 1 );
> 
> r2 = Param( "Slow avg", 26, 2, 200, 1 );
> 
> r3 = Param( "Signal avg", 9, 2, 200, 1 );
> 
> Plot( ml = MACD(r1, r2), StrFormat(_SECTION_NAME()+"(%g,%g)", r1, 
> 
> r2), ParamColor("MACD color", colorRed ), ParamStyle("MACD 
style") );
> 
> Plot( sl = Signal(r1,r2,r3), "Signal" + _PARAM_VALUES(), ParamColor
> 
> ("Signal color", colorBlue ), ParamStyle("Signal style") );
> 
> Plot( ml-sl, "MACD Histogram", IIf(ml-sl > 
0,colorBrightGreen,colorRed ), styleNoTitle | ParamStyle("Histogram 
style", 
> 
> styleHistogram | styleNoLabel, maskHistogram ));
> 
> _SECTION_END();
> 
>   ----- Original Message ----- 
>   From: areehoi 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Sunday, January 30, 2005 2:57 PM
>   Subject: [amibroker] Changing MACD histogram colors
> 
> 
> 
>   I've noticed in some software (such as Phrophet) the MACD 
histogram 
>   is in two colors; for instance Red above the mid point and Green 
>   below. I presume this can be done in AmiBroker but don't know 
how.  
>   The built in formula that I have is shown below.  What code do I 
need 
>   to paste in to make such a change? Thanks for any help offered.
> 
>   _SECTION_BEGIN("MACD");
>   r1 = Param( "Fast avg", 12, 2, 200, 1 );
>   r2 = Param( "Slow avg", 26, 2, 200, 1 );
>   r3 = Param( "Signal avg", 9, 2, 200, 1 );
>   Plot( ml = MACD(r1, r2), StrFormat(_SECTION_NAME()+"(%g,%g)", r1, 
>   r2), ParamColor("MACD color", colorRed ), ParamStyle("MACD 
style") );
>   Plot( sl = Signal(r1,r2,r3), "Signal" + _PARAM_VALUES(), 
ParamColor
>   ("Signal color", colorBlue ), ParamStyle("Signal style") );
>   Plot( ml-sl, "MACD Histogram", ParamColor("Histogram color", 
>   colorBlack ), styleNoTitle | ParamStyle("Histogram style", 
>   styleHistogram | styleNoLabel, maskHistogram ) );
>   _SECTION_END();
> 
> 
>   Dick H. 
> 
> 
> 
> 
> 
> 
>   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
> 
>     a.. To visit your group on the web, go to:
>     http://groups.yahoo.com/group/amibroker/
>       
>     b.. To unsubscribe from this group, send an email to:
>     amibroker-unsubscribe@xxxxxxxxxxxxxxx
>       
>     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service. 
> 
> 
> 
> 
> --------------------------------------------------------------------
----------
> 
> 
>   No virus found in this incoming message.
>   Checked by AVG Anti-Virus.
>   Version: 7.0.300 / Virus Database: 265.8.1 - Release Date: 
1/27/2005
> 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.8.1 - Release Date: 1/27/2005





------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/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/