- Katılım
- 23 Eki 2020
- Mesajlar
- 1,826
-----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: |