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

Notification

Icon
Error

Options
Go to last post Go to first unread
Lordvader  
#1 Posted : Tuesday, July 3, 2007 4:54:00 PM(UTC)
Lordvader

Rank: Member

Groups: Registered, Registered Users
Joined: 9/13/2006(UTC)
Posts: 24

Hi Guys!

I'm trying to solve this exploration but the results are not ok. I want to select all the stocks that PDI(14) Crossed MDI(14) in the last 10 days, and now PDI(14)>MDI(14). But the results are never correct. Some stocks have mdi(14) crossing pdi(14), why is this happening?

I've tried the following formulas without success:

Ref(Cross(PDI(14),MDI(14)),-10) and PDI(14)>MDI(14)

Alert(Cross(PDI(14),MDI(14)),-10) and PDI(14)>MDI(14)

Ref(Cross(+DI(),-DI()),-10) and PDI(14)>MDI(14)

Could you help me?

Thanks,

Lordvader

wabbit  
#2 Posted : Tuesday, July 3, 2007 8:10:14 PM(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)
Vader,

You were ever soooo close to achieveing the goal with:

Code:

Alert(Cross(PDI(14),MDI(14)),-10) and PDI(14)>MDI(14)


However the Alert function takes only positive value, so it should be:

Code:

Alert(Cross(PDI(14),MDI(14)),10) and PDI(14)>MDI(14)




Another way to write this is take "positive charge" of the Cross() function. In essence, you are looking for the PDI() to be greater than MDI() on the last bar and, at some time in the last 10 bars for the PDI() to be below or equal to the MDI(), achievable using:

Code:

x:=PDI(14)>MDI(14);

{return}
x and Alert(x=0,10);



Hope this helps.

wabbit [:D]

Lordvader  
#3 Posted : Wednesday, July 4, 2007 2:54:25 AM(UTC)
Lordvader

Rank: Member

Groups: Registered, Registered Users
Joined: 9/13/2006(UTC)
Posts: 24

Hi Wabbit!

Thanks for your help.

I'm getting all the crosses of the last 10 days (with both codes), unfortunately some of the select stocks still have mdi(14)>pdi(14). I don't understand... Any problem with my MS?

Regards,

Lord

amory  
#4 Posted : Wednesday, July 4, 2007 3:06:20 AM(UTC)
amory

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/18/2007(UTC)
Posts: 99
Location: sydney australia

Ten days is too much, make that 3 at the most!
Lordvader  
#5 Posted : Wednesday, July 4, 2007 3:37:47 AM(UTC)
Lordvader

Rank: Member

Groups: Registered, Registered Users
Joined: 9/13/2006(UTC)
Posts: 24

Hi Amory.

Same result with only 3 days.

Thanks

wabbit  
#6 Posted : Wednesday, July 4, 2007 4:11:41 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)
How much data are you loading into the exploration? My very quick investigation showe there was a difference in the results between loading 500 bars and "load minimum bars" (which apparently is 19 bars for this exploration)

My filter condition:
x:=PDI(14)>MDI(14);
x AND Alert(x=0,10);

and just to check I also added Column A:
PDI(14)>MDI(14);

which all returned true as a result of running the exploration, both times. I had no returns where the MDI was above the PDI.

The difference in the returns between the 500 bar exploration and the load minimum bars exploration was in the number of equities returned from each scan, 577 from the first and 378 from the second, so the amount of data loaded does make some difference, but not to the results.

What are we missing?


wabbit [:D]

Lordvader  
#7 Posted : Wednesday, July 4, 2007 4:23:49 AM(UTC)
Lordvader

Rank: Member

Groups: Registered, Registered Users
Joined: 9/13/2006(UTC)
Posts: 24

Wabbit, In explorer options: loading 10000 records. I've changed it to 500 but the result is the same...

I'm working with about 400 stocks.

Thanks a lot.

amory  
#8 Posted : Wednesday, July 4, 2007 4:37:00 AM(UTC)
amory

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/18/2007(UTC)
Posts: 99
Location: sydney australia

tried it out & got the same problems as Lordvader. what I think is happening:

Explorer does not recognize MDI and PDI, because I could not find them in the Ind-builder nor in the Quicklist. or maybe it has a vague notion that they exist, but doesn't know what to do with them. it does not reject the exploration formula, but the result is quite mad.

amory  
#9 Posted : Wednesday, July 4, 2007 5:13:26 AM(UTC)
amory

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/18/2007(UTC)
Posts: 99
Location: sydney australia

No, that doesn't make sense. I have looked up an old exploration of mine which upon running it, worked perfectly. leaving out various bits & pieces (volume, Macd etc) this is it:

Cross(PDI(14),(MDI(14))) AND
((ADX(12)>Ref(ADX(12),-1) AND PDI(14)>28))

the difference is that it requires the breakthru now, not within so many days preceding. perhaps that is where a modification is needed.

wabbit  
#10 Posted : Wednesday, July 4, 2007 5:34:17 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)
What results do you get if you only have the filter condition:

PDI(14)>MDI(14)

??

Do you get any results to the contrary?


wabbit [:D]


amory  
#11 Posted : Wednesday, July 4, 2007 5:54:20 AM(UTC)
amory

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/18/2007(UTC)
Posts: 99
Location: sydney australia

I've got it now. doing it the oldfashioned way, with columns:

cola: close

colb: Alert(Cross(PDI(14),(MDI(14))),3)

colc: ADX(12)>Ref(ADX(12),-1) AND PDI(14)>28

and the filter simply: colb=1 and colc=1

it did everything as requested. I bet if you put a 10 instead of the 3, it would work for you.

Lordvader  
#12 Posted : Wednesday, July 4, 2007 8:57:22 AM(UTC)
Lordvader

Rank: Member

Groups: Registered, Registered Users
Joined: 9/13/2006(UTC)
Posts: 24

Nope!

wabbit  
#13 Posted : Wednesday, July 4, 2007 9:03:49 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)
Nope : wabbit's method

or

Nope: amory's method

???


What other information can you provide? Periodicity? Market? MS version? The more info we have, the easier(?) it will be to find a solution.


wabbit [:D]


Lordvader  
#14 Posted : Wednesday, July 4, 2007 9:12:34 AM(UTC)
Lordvader

Rank: Member

Groups: Registered, Registered Users
Joined: 9/13/2006(UTC)
Posts: 24

Hi!

Nope: both

Periodicity: EOD data

Market: European markets - AEX, BEL, CAC, DAX, IBEX, PSI

MS Version: 9.0 RT

OS: MS windows XP SP2

- I think will uninstall MS and install again and see the result...

Thanks

Lordvader  
#15 Posted : Friday, July 6, 2007 7:50:57 AM(UTC)
Lordvader

Rank: Member

Groups: Registered, Registered Users
Joined: 9/13/2006(UTC)
Posts: 24

Hi friends!

Well... anyone had the luck with any of the posted formulas and got 100% correct results?

I would apreciate your comments.

Thanks,

Lord

uasish  
#16 Posted : Friday, July 6, 2007 12:25:22 PM(UTC)
uasish

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/13/2005(UTC)
Posts: 170

Thanks: 7 times

Lordvader,

Load Min option gives only 5 no bars but changing to 1300 records give result with this code.

x:=PDI(14)>MDI(14);
BarsSince(x=0)=10 AND x

or

x:=PDI(14)>MDI(14);
y:= Sum(When(x=1),10);
If(Ref(y,-1)=9 AND y=10,1,0)

Asish

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.