Skip to main content

Hourly MACD for Amibroker (AFL)

mrugen over 16 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 2)
  • Tags:
    oscillator, macd, amibroker, intraday, hourly

Hourly MACD with signal and histogram.

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("MACD");

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

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

1 comments

Leave Comment

Please login here to leave a comment.