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 #

No Name 1 by Svein Andersen
-----Ursprungligt meddelande-----
Fra*n: Svein Andersen <svan@xxxxxxxxx>
Till: metastock@xxxxxxxxxxxxx <metastock@xxxxxxxxxxxxx>
Datum: den 14 juli 1998 21:00
Ämne: System formula, help!


Hei!
Anybody out there kindly help me with the forulas for this following trading rules:

Enter long:
1.Todays close have to be higher than yesterdays high.
2.Todays close have higher reading than 5-days SMA with 1 day horizontal shift.
3.Todays Stochastic (%K, time periods=5, smoothing periods=3 & dobbel smoothing periods=3) must have higher readings than yeasterdays.

Close long: (only one rule)

1.To days close is lower than the low of the highest bar since enter long.

No rules for short selling.

Thanks!

Svein Andersen
Bnesheia 48
5062 BNES
NORWAY


I have tried to program what you wanted though I was unsure of some of your definitions.
The result is really great! I have tested it with some of the most important stocks in the Swedish market and it works splendidly. Maybe it´s not exactly what you asked for but here it is (and it works!!):


No Name 1

Enter Long:

C> Ref(H,-1) AND C> Mov(C-1,5,S) AND Stoch(5,3)>Ref(Stoch(5,3),-1)


Close Long:

HIGH1:=HighestSince(1,C>Ref(H,-1) AND C> Mov(C-1,5,S) AND
Stoch(5,3)>Ref(Stoch(5,3),-1),H);
C<ValueWhen(1,HIGH1,L)

 

I have guessed what you mean by "1 day horizontal shift" and I don't know the "double smoothing" (like in Stochastic Momentum Index??) Also "since enter long" means the latest time that occured, not when youactually entered (Can that be programmed??). Think this sollution is better,since it moves the exitrule forward.

Best regards

Chris Lindstedt
Swedish Metastock-Group, Swedish TA-Group

Source / From: TOP
http://purebytes.com/archives/metastock/

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!