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

Re: [amibroker] How to plot an MACD of a variable



PureBytes Links

Trading Reference Links

MACD is the difference between two EMAs, so I presume that MACDRSI would be:
 
fastEMA = EMA(RSI(14), 9);
slowEMA = EMA(RSI(14), 26);

macdRSI = fastEMA - slowEMA;

Plot(macdRSI, "macdRSI", colorRed);

 

----- Original Message -----
From: axium102
Sent: Tuesday, January 03, 2006 11:01 AM
Subject: [amibroker] How to plot an MACD of a variable


Hello to all;

I am trying to plot an MACD of a variable that is stored in "X".
That variable is a relative strenght ( performance rather - not an
RSI) - indicator - that part works fine. The code is as follows:

> X= RelStrength( "GC" );


Then I would like to plot an MACD of that X - I can not succeed in
that.
Below is an MACD code pasted from amobroker. How to modify it so that
it references to the "X" rather - not the price array:

> 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 ) );

ANy suggestions ?

Thanks

ANdrew








No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.9/216 - Release Date: 12/29/05


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS