Ema5/21 + macd + rsi(14) > 50 < 50 afl

vsreeram77

Active Member
#1
Dear friends

i want an afl which plots buy when

EMA 5 > EMA 21 ALONG with MACD above zero and RSI(14) > 50

and mark exit symbol

when EMA 5< EMA 21

or

MACD below zero with RSI(14) < 50 WHICH COMES AT FIRST

again place re entry in buy if all are same trend

or

when EMA 5 < EMA 21 , MACD along with RSI(14) < 50 , I WANT to place sell arrow in chart

Kindly help
 
#3
just gave info about code . let made possible changes if u want to this


Code:
Buy  = EMA(C,5)>EMA(C,21) AND MACD(12,26)>0 AND RSI(14)>50;
Sell = EMA(C,5)<EMA(C,21)  OR MACD(12,26)<0 AND RSI(14)<50;
Good attempt :thumb:

Now just add the code for Short and Cover, remove extra signals(exrem) and plot arrows :)


Happy :)
 
#4
need afl for first candle which has open and close above 200ema look back for 10 candles.
and 90 day average volume is 30000
buy=open and close is above 200 ema (the first candle in last 10 previous candle)
sell=open and close is below 200 ema (the first candle in last 10 previous candle)
 
#8
kindly provide full source code for my concept requested, thank you
Code:
Buy =  EMA(C,5) > EMA(C,21) AND MACD(12,26) > 0 AND RSI(14) > 50;
Sell = EMA(C,5) < EMA(C,21)  OR MACD(12,26) < 0  OR RSI(14) < 50;

Short = EMA(C,5) < EMA(C,21) AND MACD(12,26) < 0 AND RSI(14) < 50;
Cover = EMA(C,5) > EMA(C,21)  OR MACD(12,26) > 0  OR RSI(14) > 50;

Buy  = ExRem(Buy,Sell);					Short = ExRem(Short,Cover);    
Sell = ExRem(Sell,Buy);					Cover = ExRem(Cover,Short);  

PlotShapes(Buy * 1+2*Short,colorWhite,0,IIf(Buy,L,H),-24);
PlotShapes(Cover*3+4* Sell,colorWhite,0,IIf(Cover,L,H));
Such simplistic system do not work consistently in different market conditions.

However it is a good learning step.

Your mother candle concept is much better as you are also using a filter (0.1%) to remove trades based on small range bars . . .

Best :thumb:

Happy :)
 

Similar threads