I’d like to get AFL scan for Below Condition. Please Help Me.
Condition:
Buy signal: When short term Moving average 20 cross above Moving average 50, and long-term Moving average 100 is above Moving average 200 to confirm uptrend.
@hungnsm11 this site works best if you show us your attempts at coding, and we can help you learn if you have made a mistake, or we see a better way to approach it.
Coming on the site, waiting an hour, then posting a “do it for me” type questions, does not endear you to us. Why should we help if you have not put the effort in to try???
When you come to post your work, make sure you read the “How to use this site” and use the proper code tags.
Hi,
It is Very Simple only.
Please Try this one.
Learn AFL and come up next time with an attempt.
Nobody would help you out if you ask this way every time.
_SECTION_BEGIN("20/50/100/200 EMA Trending");
W=EMA(C,20);
X=EMA(C,50);
Y=EMA(C,100);
Z=EMA(C,200);
Buy = Ref(W,-1)<Ref(X,-1) AND Ref(W,0)>Ref(X,0) AND Ref(Y,0)>Ref(Z,0) ;
Sell = Ref(W,-1)>Ref(X,-1) AND Ref(W,0)<Ref(X,0) AND Ref(Y,0)<Ref(Z,0) ;
PlotShapes( shapeUpArrow*Buy, colorPink,0, L, -20);
PlotShapes( shapeDownArrow*Sell, colorPink,0,H, -20) ;
Filter=Buy OR Sell;
AddColumn(Buy,"BUY",1.2);
AddColumn(Sell,"SELL",1.2);
_SECTION_END();
@ Gloriafilamino plz help me also devolop an afl code.I want to develop an AFL code that recognises and gives indication like lines or dots in the specific time frame whenever 50 ema,100 ema,150 ema and 200 ema reach almost equal level for a short time like 5 min,10 min,15 min,30 min++ time.