MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

Tema PDI - MDI
Here's an excellent short article from Jim Greening, showing how MetaStock system
tests can be built up ... This week I'm going to discuss my third MetaStock Profit System Test- 03_Tema PDI - MDI, ADX (Vol Required).This test is based on Wilder's directional movement indicators. Asthe MetaStock manual indicates, Wilder says a buy signal occurs when PDI - MDI moves above zero anda sell signal occurs when PDI-MDI falls below zero.I started with that thought and experimented a little. Wilder used14 day periods to calculate his PDI and MDI functions.Since I like Fibonacci numbers, I used 13 days instead. Also I liketo smooth my indicators so I used Tema smoothing7.

My custom PDI - MDI formula then became:

Tema PDI - MDI

Periods := Input("Enter Tema Smoothing Periods",8,55,13);
Tema(PDI(13) - MDI(13),Periods)


I started with the idea that I would take the PDI-MDI crossover of anoptimized number as my basic buy and sell trigger.However, this number did not have to be zero and did not have to bethe same for entering long and entering short.After a lot of trial an error I decide -1, -3, or -5 would be my enterlong number and -5, -13, or -21 would be my enter short number. This makes sense since the market is biased to the up side, so enteringa little under zero would get us in a little earlier.Also down moves tend to be fast an extreme and this would only letus in short for larger, faster down moves which is what I wanted.Finally I wanted some way to reduce the number of false signals andI wanted to do that with directional movement indicatorsonly so this test would be completely uncorrelated with my other tests.

For long positions, I notice that most up moves started when adx waslow and that adx climbed during the move to a max andthen started to fall at the end of the move. Therefore, I thought anadx max and min for a buy signal would help reduce falsesignals. After some experimenting, I set the min at 8 and the max at21. I also noticed that most good buy points occurred when MDI and ADX were close together so I decided that the differencebetween the two should be small.After more experimenting, I decided on the following for my open longsignal:

Open Long:
Alert(Cross(Fml("Tema PDI - MDI"),opt1),13) AND
MDI(13) - ADX(13) <= 4 AND
MDI(13) - ADX(13) >= -2 AND
ADX(13) >= 8 AND
ADX(13) <= 21

To close my open long position I wanted the PDI-MDI to be less than opt1.
When a stock starts to drop, the MDI starts to rise, so I wanted theMDI to be greater than a certain number to close a position.Finally, since markets are biased upwards, I also wanted the 55 dayvariable moving average to be dropping before I closed the position.Therefore, the close long became:

Close Long:
Fml("Tema PDI - MDI") < opt1 AND
MDI(13) > 21 AND
LLV(Mov(L,55,VAR),5) = LLV(Mov(L,55,VAR),13)

To open a short position, I wanted the PDI-MDI to cross below a fairlyhigh negative number.
I wanted confirmation in thatthe adx was still fairly high when that happened. The answer was:

Open Short:
Alert(Cross(opt2,Fml("Tema PDI - MDI")),8) AND
ADX(13) > 34

To close the short position, I only wanted PDI-MDI to be greater thana certain positive number.
I don't like a lot of confirmations for closing shorts. With the biasbeing up, you need to close shorts fast.
My close Short and optimization became:

Close Short:

Fml("Tema PDI - MDI") > 13

Opt1: Min = -1 Max = -5 Step = 2
Opt2: Min = -21 Max = -5 Step = 8

That's it. Any comments or questions?

Source / From: TOP

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!