logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
RalphOD  
#1 Posted : Friday, October 19, 2012 1:36:05 AM(UTC)
RalphOD

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 10/3/2012(UTC)
Posts: 4

I am new to MetaStock and this forum. I got a formula from Traders.com > Traders' Tips > MetaStock: November 2012. I ran it in The Explorer and it returned a few stocks. My question is; shouldn't the value of all three ADX lines for the stocks returned have the same numbers and all be below 30? That is not what is being returned. What am I missing? a1:= ADX(3); a2:= ADX(4); a3:= ADX(5); a1 = a2 AND a1 = a3 AND a1 < 30 Sorry I couldn't post the image. I don't know how yet. Thanks, Ralph
wabbit  
#2 Posted : Friday, October 19, 2012 7:07:42 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Uncheck load minimum records in the explorer options, and load a reasonable amount of data. wabbit \[:D]
RalphOD  
#3 Posted : Friday, October 19, 2012 8:44:10 AM(UTC)
RalphOD

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 10/3/2012(UTC)
Posts: 4

Thanks, that did it. I don't understand why. I had the same data loaded before. All I did was unchecked the load minimum records box. Is there a simple explanation?
henry1224  
#4 Posted : Friday, October 19, 2012 12:01:39 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
Please check your code again!

Here is the correct code from Stocks & Commodities

Code:

ADX clusters
Formula for the start of move:

a1:= ADX(3);
a2:= ADX(4);
a3:= ADX(5);
a1 = a2 AND a1 = a3 AND a1 < 30


Formula for the end of a move:

a1:= ADX(3);
a2:= ADX(4);
a3:= ADX(5);
70 < min(a1, min(a2, a3)) AND
cross(0, roc(a1,1,$)) AND
cross(0, roc(a2,1,$)) AND
cross(0, roc(a3,1,$))


+DI clusters
Formula for a market bottom:

p1:= PDI(5);
p2:= PDI(8);
p3:= PDI(14);
mark:= 10 > Max(p1, Max(p2, p3)) AND
5 > Min(p1, Min(p2, p3));
Ref(mark,-1) AND ROC(p1,1,$)>0 AND
ROC(p2,1,$)>0 AND ROC(p3,1,$)>0


Formula for a strong buy:

a1:= ADX(3);
a2:= ADX(4);
a3:= ADX(5);
p1:= PDI(5);
p2:= PDI(8);
p3:= PDI(14);
mark:= 10 > Max(p1, Max(p2, p3)) AND
5 > Min(p1, Min(p2, p3));
70 < min(a1, min(a2, a3)) AND
90 < max(a1, max(a2, a3)) AND
cross(0, roc(a1,1,$)) AND
cross(0, roc(a2,1,$)) AND
cross(0, roc(a3,1,$)) AND
Ref(mark,-1) AND ROC(p1,1,$)>0 AND
ROC(p2,1,$)>0 AND ROC(p3,1,$)>0


-DI clusters:
Formula for a market top:

m1:= PDI(5);
m2:= PDI(8);
m3:= PDI(14);
mark:= 10 > Max(m1, Max(m2, m3)) AND
5 > Min(m1, Min(m2, m3));
Ref(mark,-1) AND ROC(m1,1,$)>0 AND
ROC(m2,1,$)>0 AND ROC(m3,1,$)>0


Formula for a strong sell:

a1:= ADX(3);
a2:= ADX(4);
a3:= ADX(5);
m1:= PDI(5);
m2:= PDI(8);
m3:= PDI(14);
mark:= 10 > Max(m1, Max(m2, m3)) AND
5 > Min(m1, Min(m2, m3));
70 < min(a1, min(a2, a3)) AND
90 < max(a1, max(a2, a3)) AND
cross(0, roc(a1,1,$)) AND
cross(0, roc(a2,1,$)) AND
cross(0, roc(a3,1,$)) AND
Ref(mark,-1) AND ROC(m1,1,$)>0 AND
ROC(m2,1,$)>0 AND ROC(m3,1,$)>0
RalphOD  
#5 Posted : Friday, October 19, 2012 12:30:51 PM(UTC)
RalphOD

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 10/3/2012(UTC)
Posts: 4

The code I used is exactly like the first one you show: a1:= ADX(3); a2:= ADX(4); a3:= ADX(5); a1 = a2 AND a1 = a3 AND a1 < 30 I just copied it and missed the last part. duh! I still can't figure it out. Thanks for the reply.
mstt  
#6 Posted : Friday, October 19, 2012 3:00:44 PM(UTC)
mstt

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 Ralph

The construction of ADX includes Wilders Smoothing and ATR which itself uses Wilders Smoothing. Wilders Smoothing is a form of exponential moving average, and EMAs use a diminishing amount or ALL historical data to generate a result. In practical terms an EMA requires up to 5 times as much data as the nominated Periods parameter to produce a reasonably accurate result. When using Minimum Records in the Explorer MetaStock will only load about 1.3 times the longest Periods parameter. This is insufficient data to generate a result that is anywhere near accurate.

I hope this explains the problem. If you're skeptical then I suggest that you run a series of tests with any function that includes an EMA in its makeup (there are many of them).

Roy
RalphOD  
#7 Posted : Saturday, October 20, 2012 1:22:33 AM(UTC)
RalphOD

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 10/3/2012(UTC)
Posts: 4

That explains it. Thanks Roy, I appreciate your help and everyone else who contributed to my understanding. This seem like a great community. Nice experience for a first time poster.
Users browsing this topic
Guest (Hidden)
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.