afl request

XRAY27

Well-Known Member
#1
Dear sir
i want an afl for macd where its cross over of macd line with signal line
will be reflected in price charts as arrow:thanx:
 

johnnypareek

Well-Known Member
#2
Dear sir
i want an afl for macd where its cross over of macd line with signal line
will be reflected in price charts as arrow:thanx:
chk this

HTML:
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();


_SECTION_BEGIN("MACD");
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);
Buy=Cross(ml,sl);
Sell=Cross(sl,ml);
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorBlue, colorYellow ), 0, IIf( Buy, Low-10, High+10));

_SECTION_END();
 

XRAY27

Well-Known Member
#4
80 period SMA (Simple Moving Average) applied to the “typical price” (high+low+close)/3.
 

johnnypareek

Well-Known Member
#5
80 period SMA (Simple Moving Average) applied to the typical price (high+low+close)/3.
here

HTML:
_SECTION_BEGIN("Price");

GraphXSpace=5;
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() ); 



_SECTION_END();
_SECTION_BEGIN("MA");

P = (H+L+C)/3;
Periods = Param("Periods", 80, 2, 200, 1 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") | styleNoRescale ); 
_SECTION_END();
 

jsb2012

Active Member
#6
Seniors i want to plot the hi, lo & close of 3 hour candle (9.30am to 12.30pm)of previous day. Pls help me by giving afl code only for that its enough. pls
 

Similar threads