+di > -di and ema 13 > ema 21

Can anybody help me out codes for following scanning conditions:--

I want to the search via scan option in PI on nifty50 stocks where :--

BUY CONDITIONS :--

EMA13 is above EMA21 and +DI is above -DI

( Pls Note i want results of stocks where EMA 13 is above EMA21 i.e. no matter when crossover has happened. )

Pls Note i want results of stocks where +DI is above -DI i.e. no matter when crossover has happened. )

Further if above codes possible all parameters reversed for SELL CONDITIONS as well.

Looking forward for positive reply at the earliest

Thanks in advance.

1 Like

Buy:

CROSSOVER(EMA(CLOSE, 13), EMA(CLOSE, 21)) AND CROSSOVER(DIP(14), DIN(14))

Sell:

CROSSOVER(EMA(CLOSE, 21), EMA(CLOSE, 13)) AND CROSSOVER(DIN(14), DIP(14))
2 Likes

Creating error when i am running BACK test, the same code i used from the expert adviser.

SIR, Thks for you prompt reply and appriciate your coperation in the matter.
But unfortunately this solution is irrelevant to me as i only want results where stocks EMA13 is above EMA21 and +DI 14 is above –DI 14. I have clearly mentioned it does not matter when this crossover has taken place.
Please try to understand my requirement I don’t want crossover based codes like you have provided in my this query as well as my earlier query dated 27/3/15. If it is possible for you kindly code my requirement as per my need.
Regards,