+91-0000000000

}

Monday – Friday : 9:00 AM – 6:30 PM

MAC Line

The MAC Line AFL calculates and visualizes the Moving Average Convergence Line. When paired with an AmiBroker data feed, it aids in illustrating the convergence or divergence of moving averages, offering insights into potential trend changes.

/
_SECTION_BEGIN("Price");
COLOR = IIf(C > O, colorGreen, colorRed);
SetChartOptions(0,chartShowDates|chartShowArrows|chartLogarithmic|chartWrapTitle);
_N( Title = StrFormat( "{{NAME}} - " + SectorID( 1 ) + " - {{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", Color, styleBar | styleThick | styleNoTitle );

_SECTION_END();

_SECTION_BEGIN("MAC");
MAL = MA(L,8);
MAH = MA(H,10);
Plot(MAH, "MAH", colorLightBlue, styleThick);
Plot(MAL, "MAL", colorOrange, styleThick);
_SECTION_END();

_SECTION_BEGIN("Phase");
RCP = C > MA(C,50) AND MA(C,50) < MA(C,200); // Recovery
ACP = C > MA(C,50) AND C > MA(C,200) AND MA(C,50) < MA(C,200); // Accumulation
BLP = C > MA(C,50) AND C > MA(C,200) AND MA(C,50) > MA(C,200); // Bullish
WRP = C < MA(C,50) AND MA(C,50) > MA(C,200); // Warning
DSP = C < MA(C,50) AND C < MA(C,200) AND MA(C,50) > MA(C,200); // Distribution
BRP = C < MA(C,50) AND C < MA(C,200) AND MA(C,50) < MA(C,200); // Bearish

Plot( 1, "", IIf(RCP, colorBlue, IIf(ACP, colorSeaGreen, IIf(BLP, colorDarkGreen, IIf(WRP, colorOrange, IIf(DSP, colorRed, IIf(BRP, colorDarkRed, 0)))))), styleOwnScale|styleArea|styleNoLabel, -0.1, 50 );
_SECTION_END();

GraphXSpace = 5;

_SECTION_BEGIN("Commentary");
printf ( "=========================" +"\n");
printf ( "PRICE ANALYSIS" +"\n");
printf ( "=========================" +"\n");
printf ( Name() + " - " +Interval(2) +  "  - " + Date() +" - " +"\n\n"+"High-"+H+"\n"+"Low-"+L+"\n"+ 
"Range= "+ WriteVal(H-L, formate = 1.2)+"\n\n"+"Open-"+O+"\n"+
"Close-"+C+"\n"+ "O/C Diff= "+  WriteVal(C - O, formate = 1.2)+ "\n\n"+
"Last Close= "+  WriteVal(Ref(C,-1), formate = 1.2)+ "\n"+ 
"Change= "+  WriteVal(C - Ref(C,-1), formate = 1.2)+ "\n\n"+
"Volume= "+ WriteVal(V, formate = 1.0)+"\n"+ 
"Avg. Vol= "+ WriteVal(MA(MA(MA(V,20),20),20), formate = 1.0)+"\n");
_SECTION_END();


//=====================================================================
//background stock name (works only on Amibroker version 5.00 onwards.
//=====================================================================
_SECTION_BEGIN("Name");
GfxSetOverlayMode(1);
GfxSelectFont("Tahoma", Status("pxheight")/6 );
GfxSetTextAlign( 6 );// center alignment
//GfxSetTextColor( ColorRGB( 200, 200, 200 ) );
GfxSetTextColor( ColorHSB( 42, 42, 42 ) );
GfxSetBkMode(0); // transparent
GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/12 );
GfxSelectFont("Tahoma", Status("pxheight")/12 );
GfxTextOut( "MAV'S CHART", Status("pxwidth")/2, Status("pxheight")/3 );
GfxSelectFont("Tahoma", Status("pxheight")/36 );
GfxTextOut( "mavirk@gmail.com", Status("pxwidth")/2, Status("pxheight")/2 );
_SECTION_END();
//======================================================================================

Open chat
1
Hi, how can I help you?