Welcome Features News Download Registration Support FAQ Wish list Links
Advanced stock charting and analysis program

AFL Library

This is read-only version of AFL library entry. Ability to add user formulas and comment is only available from members-only area.

Details:

Formula name: Color MACD Histogram Changes
Author/Uploader: MTR Investors Group - support [at] mtrig.com
Date/Time added: 2009-06-26 22:18:04
Origin: Dr. Alexander Elder
Keywords: Triple Screen, Elder
Level: basic
Flags: indicator

DISCLAIMER: Most formulas present in AFL on-line library are submitted by the users and are provided here on an "as is" and "as available" basis. AmiBroker.com makes no representations or warranties of any kind to the contents or the operation of material presented here. We do not maintain nor provide technical support for 3rd party formulas.
Description:

Use on weekly charts to determine Trend Changes. If the Weekly Bars are Green check the daily bars for LONG entries, if the Weekly Bars on Red check the daily for SHORT entires.

Formula:

/*-----------------------------------------------------------
MTR Investors Group - www.MTRIG.com

Color MACD Histogram Bars. Use on weekly chart to determine
market trend. See Elder "Come into my trading room"
-------------------------------------------------------------*/

r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );

ml = MACD(r1, r2);
sl = Signal(r1,r2,r3);
Hist = ml-sl;

MACUP = Hist > Ref(Hist,-1);
MACDN = Hist < Ref(Hist,-1);

BarColor  = IIf(MACUP,colorGreen,IIf(MACDN,colorRed,colorBlue));

//Plot( Hist, "MACD Histogram", ParamColor("Histogram color", colorBlack ),
styleNoTitle | ParamStyle("Histogram style", styleHistogram | styleNoLabel,
maskHistogram ) );

Plot( Hist, "MACD Histogram", BarColor  , styleHistogram );
Plot(0, "0", colorBlueGrey );

Comments:


About | Privacy | Terms of Use | Contact information
Copyright © 2001 AMIBROKER.COM