need some modification in this afl

#1
I found this Afl in traderji....i need some modification in this afl

i request you to kindly do this

mr jonny and many more people are hear
pleas kindly help me


thanks in advance

KARTHICK
 

Attachments

#3
_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", colorDefault, styleNoTitle | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("MA");
P = ParamField("Price field",-1);
Periods1 = Param("Periods1", 9, 1, 500, 1, 10 );
Periods2 = Param("Periods2", 30, 1, 500, 1, 10 );
Periods0 = Param("Periods0", 3, 1, 500, 1, 10 );

Plot(e1 = EMA( P, Periods1 ), StrFormat(_SECTION_NAME()+"(%g)", Periods1), ParamColor( "Color1", colorRed ), ParamStyle("Style") );
Plot(e2 = EMA( P, Periods2 ), StrFormat(_SECTION_NAME()+"(%g)", Periods2), ParamColor( "Color2", colorBlue ), ParamStyle("Style") );
Plot(e0 = EMA( P, Periods0 ), StrFormat(_SECTION_NAME()+"(%g)", Periods0), ParamColor( "Color0", colorWhite ), ParamStyle("Style") );

Buy = e1 > e2 AND e0 > e1; //check that Sell condition is not operational
Sell = e1 > e0;
Buy = ExRem(Buy,Sell); Sell = ExRem(Sell,Buy);

Short = e2 > e1 AND e1 > e0; //check that Cover condition is not operational
Cover = e0 > e1;
Short = ExRem(Short,Cover); Cover = ExRem(Cover,Short);


PlotShapes(Buy+2*Short, colorWhite, 0,IIf(Buy OR Cover,L,H));
PlotShapes(3*Cover+4*Sell, colorWhite, 0,IIf(Buy OR Cover,L,H),-24);

Color1 = IIf( EMA(p,periods1) > EMA(p,periods2), colorGreen, colorYellow);
Color2 = IIf( EMA(p,periods0) > EMA(p,periods1), colorBlue, colorRed);

Plot(1, "", Color1, styleArea | styleOwnScale | styleNoLabel, -0.1, 30 );
Plot(1, "", Color2, styleArea | styleOwnScale | styleNoLabel, -2.1, 28 );

_SECTION_END();
 

johnnypareek

Well-Known Member
#6
_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", colorDefault, styleNoTitle | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("MA");
P = ParamField("Price field",-1);
Periods1 = Param("Periods1", 9, 1, 500, 1, 10 );
Periods2 = Param("Periods2", 30, 1, 500, 1, 10 );
Periods0 = Param("Periods0", 3, 1, 500, 1, 10 );

Plot(e1 = EMA( P, Periods1 ), StrFormat(_SECTION_NAME()+"(%g)", Periods1), ParamColor( "Color1", colorRed ), ParamStyle("Style") );
Plot(e2 = EMA( P, Periods2 ), StrFormat(_SECTION_NAME()+"(%g)", Periods2), ParamColor( "Color2", colorBlue ), ParamStyle("Style") );
Plot(e0 = EMA( P, Periods0 ), StrFormat(_SECTION_NAME()+"(%g)", Periods0), ParamColor( "Color0", colorWhite ), ParamStyle("Style") );

Buy = e1 > e2 AND e0 > e1; //check that Sell condition is not operational
Sell = e1 > e0;
Buy = ExRem(Buy,Sell); Sell = ExRem(Sell,Buy);

Short = e2 > e1 AND e1 > e0; //check that Cover condition is not operational
Cover = e0 > e1;
Short = ExRem(Short,Cover); Cover = ExRem(Cover,Short);


PlotShapes(Buy+2*Short, colorWhite, 0,IIf(Buy OR Cover,L,H));
PlotShapes(3*Cover+4*Sell, colorWhite, 0,IIf(Buy OR Cover,L,H),-24);

Color1 = IIf( EMA(p,periods1) > EMA(p,periods2), colorGreen, colorYellow);
Color2 = IIf( EMA(p,periods0) > EMA(p,periods1), colorBlue, colorRed);

Plot(1, "", Color1, styleArea | styleOwnScale | styleNoLabel, -0.1, 30 );
Plot(1, "", Color2, styleArea | styleOwnScale | styleNoLabel, -2.1, 28 );

_SECTION_END();
Hope this will serve what u want

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", colorDefault, styleNoTitle | GetPriceStyle() );
_SECTION_END();
*/
_SECTION_BEGIN("MA");
P = ParamField("Price field",-1);
Periods1 = Param("Periods1", 9, 1, 500, 1, 10 );
Periods2 = Param("Periods2", 30, 1, 500, 1, 10 );
Periods0 = Param("Periods0", 3, 1, 500, 1, 10 );

Plot(e1 = EMA( P, Periods1 ), StrFormat(_SECTION_NAME()+"(%g)", Periods1), ParamColor( "Color1", colorRed ), ParamStyle("Style") );
Plot(e2 = EMA( P, Periods2 ), StrFormat(_SECTION_NAME()+"(%g)", Periods2), ParamColor( "Color2", colorBlue ), ParamStyle("Style") );
Plot(e0 = EMA( P, Periods0 ), StrFormat(_SECTION_NAME()+"(%g)", Periods0), ParamColor( "Color0", colorWhite ), ParamStyle("Style") );

Buy = e1 > e2 AND e0 > e1; //check that Sell condition is not operational
Sell = e1 > e0;
Buy = ExRem(Buy,Sell); Sell = ExRem(Sell,Buy);

Short = e2 > e1 AND e1 > e0; //check that Cover condition is not operational
Cover = e0 > e1;
Short = ExRem(Short,Cover); Cover = ExRem(Cover,Short);


PlotShapes(Buy+2*Short, colorWhite, 0,IIf(Buy OR Cover,L,H));
PlotShapes(3*Cover+4*Sell, colorWhite, 0,IIf(Buy OR Cover,L,H),-24);

Color1 = IIf( EMA(p,periods1) > EMA(p,periods2), colorGreen, colorYellow);
Color2 = IIf( EMA(p,periods0) > EMA(p,periods1), colorBlue, colorRed);

Plot(1, "", Color1, styleArea | styleOwnScale | styleNoLabel, -0.1, 30 );
Plot(1, "", Color2, styleArea | styleOwnScale | styleNoLabel, -2.1, 28 );
Plot(C,"Close",Color2,64);

_SECTION_END();
 

Similar threads