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

[amibroker] Re: candle color, price and macd


  • Date: Wed, 23 Dec 2009 06:33:15 -0000
  • From: "new2ami" <darshan_age@xxxxxxxxxxxxxx>
  • Subject: [amibroker] Re: candle color, price and macd

PureBytes Links

Trading Reference Links

Hello deepak ,
check this

SetChartOptions(0,chartShowArrows|chartShowDates);

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
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", colorBlue ), ParamStyle("MACD style") );
Plot( sl = Signal(r1,r2,r3), "Signal" + _PARAM_VALUES(), ParamColor("Signal color", colorRed ), ParamStyle("Signal style") );
Plot( ml-sl, "MACD Histogram", ParamColor("Histogram color", colorBlack ), styleNoTitle | ParamStyle("Histogram style", styleHistogram | styleNoLabel, maskHistogram ) );
Col=IIf(ml>sl,5,4);
Plot( C, "Close", Col, 64 | styleOwnScale );


candle is green when macd is above the signal line , and red when macd is below its signal line.
thank you
*hope this is what you needed
--- In amibroker@xxxxxxxxxxxxxxx, Deepak Patade <deepakpatade@xxx> wrote:
>
> Can you helpme in this
> Plot the color of candle green if MACD is above signal line 
> and
> Plot the candle red when signal line is above green line.
> 
> Price
> ("Price");SetChartOptions(0,chartShowArrows|chartShowDates);_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol "+WriteVal( V, 1.0) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1)) ));Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); if
> {
> ToolTip=
> }( ParamToggle("Tooltip shows", "All Values|Only Prices") )StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g (%.1f%%)\nVolume: "+NumToStr( V, 1), O, H, L, C, SelectedValue( ROC( C, 1)));
> 
> 
> macd
> r1 = Param( "Fast avg", 12, 2, 200, 1);Param( "Slow avg", 26, 2, 200, 1);Param( "Signal avg", 9, 2, 200, 1);Plot( ml = MACD(r1, r2), StrFormat(_SECTION_NAME()+"(%g,%g)", r1, r2), ParamColor("MACD color", colorBlue ), ParamStyle("MACD style") );Plot( sl = Signal(r1,r2,r3), "Signal"+ _PARAM_VALUES(), ParamColor("Signal color", colorRed ), ParamStyle("Signal style") );Plot( ml-sl, "MACD Histogram", ParamColor("Histogram color", colorBlack ), styleNoTitle | ParamStyle("Histogram style", styleHistogram | styleNoLabel, maskHistogram ) );
> r2 = 
> r3 = 
>  Deepak Patade,
> Nasik.
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

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