Hi Abhay,
Thank you for the formula. Another thing do i put the entire formula in the filter column. How will it work. To Change ema to SMA we change it in this formulae itself.
What does in E in the end of EMA23:=Mov(C,23,E); stand for.
And what does C>=EMA23 AND C>=EMA30 AND
Ref(C,-1)<EMA23 AND Ref(C,-1)<EMA30, stand for. Whta does this formulae tell us. If u could explain this maybe it will help me also develop a sense of how it works.
Rgds
Rahul
Dear Rahul,
Yes.. you have to put entire formula in filter column. Since you are curious to know how it is written, here is the explaination, line by line.
EMA23:=Mov(C,23,E);
Here, we have defined a variable EMA23 (you can give any name) as moving average (MOV) of closing price (C) of 23 candles (23) and it is exponential type (E). When you are in filter column, click on the "functions" button to see all the functions and their syntax. Here if you replace E by S, it will calculate Simple MA.
EMA30:=Mov(C,30,E);
Same as above. Only thing replaced is no. of candles i.e. 30.
These first 2 lines are just the definitions of the variables. Now comes the condition in the last line. The exploration will show only those scrips which will satisfy following condition.
C>=EMA23 AND C>=EMA30 AND Ref(C,-1)<EMA23 AND Ref(C,-1)<EMA30;
In this condition, we need to now check if today's closing price (C) is more than or equal to (>=) EMA23 and (AND) EMA30. Alongwith these 2 conditions, you also want to satisfy the conditions that yesterday's closing price (ref(C,-1) - here we are referring to (ref) closing price (C) one day prior. -1 denotes 1 candle prior, -2 if used, will denote 2 candles prior... and so on) is less than (<) EMA23 and (AND) EMA30.
Since we have used the operator AND inbetween all these conditions, the exploration will show those scrips which satisafy ALL of these 4 conditions. You can also use OR, if-then loop, etc. as per your needs.
Note that I have used "candles" and not "days". So, when you change the periodicity (daily, weekly, quarterly, hourly... and so on), calculation still holds good. i.e. when charts are viewed with daily periodicity, EMA23:=Mov(C,23,E) will calculate 23 "day" EMA of closing price. When periodicity is changed to weekly, the same above formula will calculate 23 "week" EMA of closing price, and so on.
I hope this helps. Please let me know if you still have any doubts.
With regards,
Abhay