Discussions
»
Product and Service Development
»
Formula Assistance
»
Help required using Explorer: formula to find stocks 50D ExpMA cross 200D Exp MA for 40 tradings sessions or less
Rank: Member
Groups: Registered, Registered Users Joined: 2/24/2010(UTC) Posts: 16
|
Hi every one I am new to metastock programming.
For the explorer how do i find stocks whose 50D ExpMA has crossed the 200D Exp MA for 40 tradings sessions or less?
kindly help thanks
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/26/2009(UTC) Posts: 76 Location: Toronto, Canada
|
Hi jshee,
First create an indicator with your requirements b/c it would be easier to adjust later if necessary:
{NAME: EMA Cross}
x:= Mov(c,50,E);
y:= Mov(c,200,E);
z:= cross(x,y);
IF(40>BarsSince(z),1,0);
In the filter tab of the explorer write down:
Filter: FML("EMA Cross")=1
// Keep in mind that this is for the 50D EMA crossing ABOVE the 200D EMA. IF you want the opposite you should change the "z" variable in the indicator to z:=cross(y,x).
VT
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi jshee
Make sure the Explorer is set to around 1000 records so that your 200 day EMA is accurate. You might get away with 800 but I wouldn't recommend anything less. If you were to use the Explorer's Minimum Records setting your results would be quite useless. This is becaue an EMA uses ALL available data to generate a result, not just the "periods" number of bars. As a rule of thumb I suggest multiplying the longest EMA "periods" value by a factor of 5 to determine the number of records to load. The same rule should be applied to every function that uses an EMA (or Wilders Smthing) internally; common examples of such functions are ADX, ATR and RSI but there are also many others.
Roy
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 2/24/2010(UTC) Posts: 16
|
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
Help required using Explorer: formula to find stocks 50D ExpMA cross 200D Exp MA for 40 tradings sessions or less
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.