afl request

XRAY27

Well-Known Member
#1
Dear members
i want a arrow for the candle which cross ema130 and 200 without have that ema/s in the price chart just arrows should be appeared
 

johnnypareek

Well-Known Member
#2
Dear members
i want a arrow for the candle which cross ema130 and 200 without have that ema/s in the price chart just arrows should be appeared
You mean single bar crossing both ema or bar cross anyone ema??

Below code is is when any of the ema crossed as closing arrow will come.

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();
EMA130=EMA(C,130);
EMA200=EMA(C,200);

Buy=Cross(C,EMA130) AND ema130>ema200 OR Cross(C,ema200) AND ema130>ema200;
Sell=Cross(EMA130,C) AND ema130<ema200 OR Cross(ema200,C) AND ema130<ema200;


PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,Low,-15); 
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,High,-15);
 
#3
helo my seniors and afl experts I have also a
problem regarding afl..
I want 1 simple afl with reminder in
amibrocker for only bullish and bearish
engulfing pattern ..only this 2 candle
sticks...nd also reconfirm this pattern with
just next third candle condition which means
3rd candle also close previous candle high
when bullish engulfing and vice versa..plz help
me all as soon as possible
thanks in advance
 

XRAY27

Well-Known Member
#4
You mean single bar crossing both ema or bar cross anyone ema??

Below code is is when any of the ema crossed as closing arrow will come.

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();
EMA130=EMA(C,130);
EMA200=EMA(C,200);

Buy=Cross(C,EMA130) AND ema130>ema200 OR Cross(C,ema200) AND ema130>ema200;
Sell=Cross(EMA130,C) AND ema130<ema200 OR Cross(ema200,C) AND ema130<ema200;


PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,Low,-15); 
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,High,-15);
simple cross over of moving average .......
 

johnnypareek

Well-Known Member
#5
simple cross over of moving average .......
Why don't u guys write clearly at 1st post???:annoyed:

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();
EMA130=EMA(C,130);
EMA200=EMA(C,200);

Buy=Cross(EMA130,EMA200) ;
Sell=Cross(EMA200,EMA130);


PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,Low,-15); 
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,High,-15);
 

muinali

Well-Known Member
#6
:lol::lol::lol:
Why don't u guys write clearly at 1st post???:annoyed:

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();
EMA130=EMA(C,130);
EMA200=EMA(C,200);

Buy=Cross(EMA130,EMA200) ;
Sell=Cross(EMA200,EMA130);


PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,Low,-15); 
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,High,-15);
 

XRAY27

Well-Known Member
#7
Why don't u guys write clearly at 1st post???:annoyed:

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();
EMA130=EMA(C,130);
EMA200=EMA(C,200);

Buy=Cross(EMA130,EMA200) ;
Sell=Cross(EMA200,EMA130);


PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,Low,-15); 
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed, 0,High,-15);
thank you very much johnny sir..................:clapping:
 
#8
helo my seniors and afl experts I have also a
problem regarding afl..
I want 1 simple afl with reminder in
amibrocker for only bullish and bearish
engulfing pattern ..only this 2 candle
sticks...nd also reconfirm this pattern with
just next third candle condition which means
3rd candle also close previous candle high
when bullish engulfing and vice versa..plz help
me all as soon as possible
thanks in advance
 

johnnypareek

Well-Known Member
#9
helo my seniors and afl experts I have also a
problem regarding afl..
I want 1 simple afl with reminder in
amibrocker for only bullish and bearish
engulfing pattern ..only this 2 candle
sticks...nd also reconfirm this pattern with
just next third candle condition which means
3rd candle also close previous candle high
when bullish engulfing and vice versa..plz help
me all as soon as possible
thanks in advance
Hmmmm check this. I guess some plugin needed for this but which one I am not aware. If it works for u ok but if not then will write.

HTML:
Plot(C,"",colorLightGrey,styleCandle);
 
r=CdDoji( threshold = 0.05 );
s=CdHammer( rangefactor= 1.1 );
t=CdBearishEngulfing( bodyfactor = 0.4, rangefactor = 0.5);
u=CdBullishEngulfing( bodyfactor = 0.4, rangefactor = 0.5);
//PlotShapes(r*shapeSmallCircle,colorRed,Layer=0,yposition=H,Offset=12);
//PlotShapes(s*shapeCircle,colorYellow,Layer=0,yposition=H,Offset=12);
PlotShapes(t*shapeHollowSmallCircle,colorLime,Layer=0,yposition=H,Offset=15);
PlotShapes(u*shapeHollowCircle,colorBlue,Layer=0,yposition=H,Offset=15);
 
for(i=0;i<BarCount-1;i++)
{
    //if(r[i]==True)PlotText("Doji", i, H[i], colorRed, bkcolor = colorDefault);
    //if(s[i]==True)PlotText("Hammer", i, H[i], colorYellow, bkcolor = colorDefault);
    if(t[i]==True)PlotText("BearishEngulf", i, H[i], colorLime, bkcolor = colorDefault);
    if(u[i]==True)PlotText("BullishEngulf", i, H[i], colorBlue, bkcolor = colorDefault);

}

up=ValueWhen(u,H,1);
dn=ValueWhen(t,L,1);
Plot(up,"Buy Above",5,styleDots);
Plot(dn,"Sell Below",4,styleDots);
Buy=Cross(H,up);
Short=Cross(dn,L);
shape = Buy * shapeUpArrow +Short * shapeDownArrow;

PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ));
 

XRAY27

Well-Known Member
#10
Hmmmm check this. I guess some plugin needed for this but which one I am not aware. If it works for u ok but if not then will write.

HTML:
Plot(C,"",colorLightGrey,styleCandle);
 
r=CdDoji( threshold = 0.05 );
s=CdHammer( rangefactor= 1.1 );
t=CdBearishEngulfing( bodyfactor = 0.4, rangefactor = 0.5);
u=CdBullishEngulfing( bodyfactor = 0.4, rangefactor = 0.5);
//PlotShapes(r*shapeSmallCircle,colorRed,Layer=0,yposition=H,Offset=12);
//PlotShapes(s*shapeCircle,colorYellow,Layer=0,yposition=H,Offset=12);
PlotShapes(t*shapeHollowSmallCircle,colorLime,Layer=0,yposition=H,Offset=15);
PlotShapes(u*shapeHollowCircle,colorBlue,Layer=0,yposition=H,Offset=15);
 
for(i=0;i<BarCount-1;i++)
{
    //if(r[i]==True)PlotText("Doji", i, H[i], colorRed, bkcolor = colorDefault);
    //if(s[i]==True)PlotText("Hammer", i, H[i], colorYellow, bkcolor = colorDefault);
    if(t[i]==True)PlotText("BearishEngulf", i, H[i], colorLime, bkcolor = colorDefault);
    if(u[i]==True)PlotText("BullishEngulf", i, H[i], colorBlue, bkcolor = colorDefault);

}

up=ValueWhen(u,H,1);
dn=ValueWhen(t,L,1);
Plot(up,"Buy Above",5,styleDots);
Plot(dn,"Sell Below",4,styleDots);
Buy=Cross(H,up);
Short=Cross(dn,L);
shape = Buy * shapeUpArrow +Short * shapeDownArrow;

PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, Low, High ));
it is working johnny sir...........
johnny sir and vijay gupta sir for puting this in my thread:clap:
 

Similar threads