[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stochastic



PureBytes Links

Trading Reference Links

All,
     I've been playing with the new MS 6.5 for a little over a week.  I
converted my system tests and revised them to use some of the new MS 6.5
capabilities.  I'll probably still revise them over the next few weeks, but
I'm satisified enough to post them to get your comments.
     Remember, I use the system test buy and sell signals to help me
determine what stocks to add to my database and what stocks to put on my
watch list.  I make my final buy and sell decisions by eyeballing the
charts and using trend channel analysis.  I only keep about 200 stocks in
my MetaStock data base, but add to it weekly as a result of Telescan
Prosearches.  
     Once I download the data on the stocks I like from my prosearches,
I'll load the chart with 1000 days of data and view 250 days.  I then run a
comparison with my MetaStock system tests.  If I don't get a 100% or better
profit on one of the test, I'll delete that stock.  So here I'm using the
system tests as one of my selection criteria on which stocks to add to my
database.  For stocks wth 100% or greater profit, I then draw my trend
channels and change the indicators to reflect which test performed the
best.
     I then run the system test weekly on my database to help me decide
which charts to add to my watch list.  I look at the charts on my open
positions and watch list every day.  I prune my database periodically by
deleting stocks that I'm no longer interested in.
     I'm using tema smoothing in my tests.  I'll also post four custom
formulas using tema smoothing.  I use the equations rather then calling the
formulas in my tests since the tests calculate faster that way.  However,
it's easier to drag and drop the formulas once to construct the charts.
     The first three tests are based on linear regression. RSquared is a
function that measures how strong a data array of given length is trending.
 A return of one correlates to a very strong trend in either direction. a
return of zero correlates to no trend.  I'm using it to tell me when there
is no trend over the last 21 days, or that rsquared(C,21) is less than
0.15.  Now that we have no trend, we would expect one to start in the next
8 to 21 days.  If one does start we want to find the determine the
direction and get in early.  Therefore is use rsquared as a trigger, using
it as an ALERT function.  With the ALERT given, if all the rest of the
conditions are met any time within a 13 day period, the buy signal will be
generated.  I'm then using S/C and MFI, CMF, or CCI to determine trend
start and direction.
     S/C is nothing more than the normalized 34 day LinRegSlope of the
close.  I normalize it by dividing it by the close so charts are more
directly comparable.  I also multiply by 10000 just to get numbers between
0 and a few hundred.  Finally I apply Tema smoothing to get a smoother
plot.
     The theory is that if S/C is rising then a uptrend is in progress.   
If S/C is falling a down trend is in progress.  I check this by making sure
that tema(S/C) is larger than an optimized value (opt1) and is rising.  I
use the function HHV(X,5) = HHV(X,13) to check.  This is just a quick way
to determine if the most reason values of X have been rising.  If the
condition is met, then S/C is rising.  Similarly if it met the condition
LLV(X,5) = LLV(C,13) it would be falling.
     I double check the result by also making sure that MFI or CMF or CCI
are also rising.  When all conditions are met within 13 days of the alert,
we get a buy signal.  The converse is true for a sell signal.  I close the
positions when the trend has stopped.  For the long position I check that
the Tema(MFI) is below 0, the Tema(S/C) is below opt 1 and a 55 day exp
moving average is falling.  Short positions tend to move faster, so I only
look the 144 day moving aver to begin rising to close that position.  Test
2 and 3 or similar, but use CMF and CCI instead of MFI.
     Test 4 uses a different approach.  Here I'm using the Tema(ROC) which
is a 55 day ROC of the Close crossing to positive territory as my trigger. 
I'm checking trend strength by requiring the 13 day ADXR to be above an
optimized value.  I double check this by requiring that the 21 day moving
average be rising and the tema(S/C) be in positive territory.  I close it
when the tema(ROC) has a large up move and falls from a large peak with the
21 day moving average also falling or when it crosses below -5 and the
moving average is also falling.
      That's a long quick summary <G>.  Let me know what you think.

Jim

----------------------------------------
    MetaStock for Windows Indicator Builder
    
 Tema (S/C)
  
     Tema(10000*LinRegSlope(C,34)/C,34)
  
 Tema CCI
  
     Tema(CCI(55),55)
  
 Tema CMF
  
     Tema(CMF(55),55)
  
 Tema MFI
  
     Tema(MFI(55),55) - 50
  -----------------------------------------
      MetaStock for Windows System Tester
   
 ===========================================================================

 01_R2,S/C,MFI (Vol Required)
     SIGNAL FORMULAS
     ---------------
         Enter Long:
             Alert(RSquared(C,21) < 0.15,13) AND  
              Tema(10000*LinRegSlope(C,34)/C,34) > opt1 AND  
               HHV(Tema(10000*LinRegSlope(C,34)/C,34),5) =
               HHV(Tema(10000*LinRegSlope(C,34)/C,34),13) AND
                HHV(Tema(MFI(55),55),5) = HHV(Tema(MFI(55),55),13) 
  
         Close Long:
             Tema(MFI(55),55) - 50 < 0 AND
              LLV(Mov(C,55,E),5) = LLV(Mov(C,55,E),13) AND
               Tema(10000*LinRegSlope(C,34)/C,34) < opt1 
  
         Enter Short:
             Alert(RSquared(C,21) < 0.15,13)  AND
              Tema(10000*LinRegSlope(C,34)/C,34) < opt2 AND
               LLV(Tema(10000*LinRegSlope(C,34)/C,34),5) =
               LLV(Tema(10000*LinRegSlope(C,34)/C,34),13) AND
                LLV(Tema(MFI(55),55),5) = LLV(Tema(MFI(55),55),13) AND
                 Tema(MFI(55),55) - 50 < 0 AND    
                  LLV(Mov(C,144,E),5) = LLV(Mov(C,144,E),13)
  
         Close Short:
             HHV(Mov(C,144,E),5) = HHV(Mov(C,144,E),13)
  
     OPTIMIZATION VARIABLES
     ----------------------
         OPT1: Min = -34.00  Max = -8.00  Step = 13.00
         OPT2: Min = -55.00  Max = -13.00  Step = 21.00
  
     STOPS ALL OFF

 ===========================================================================

 02_R2,S/C,CMF (Vol Required)
     SIGNAL FORMULAS
     ---------------
         Enter Long:
             Alert(RSquared(C,21) < 0.15,13) AND  
              Tema(10000*LinRegSlope(C,34)/C,34) > opt1 AND
               HHV(Tema(10000*LinRegSlope(C,34)/C,34),5) =
               HHV(Tema(10000*LinRegSlope(C,34)/C,34),13) AND
                HHV(Tema(CMF(55),55),5) = HHV(Tema(CMF(55),55),13) AND
                 Tema(CMF(55),55) > 0 
  
         Close Long:
             (Tema(CMF(55),55) < 0 AND
              LLV(Mov(C,55,E),5) = LLV(Mov(C,55,E),13) AND
               Tema(10000*LinRegSlope(C,34)/C,34) < opt1)
  
         Enter Short:
             Alert(RSquared(C,21) < 0.15,13)  AND
              Tema(10000*LinRegSlope(C,34)/C,34) < opt2 AND
               LLV(Tema(10000*LinRegSlope(C,34)/C,34),5) =
               LLV(Tema(10000*LinRegSlope(C,34)/C,34),13) AND
                LLV(Tema(CMF(55),55),5) = LLV(Tema(CMF(55),55),13) AND
                 LLV(Mov(C,144,E),5) = LLV(Mov(C,144,E),13) AND
                  Tema(CMF(55),55) < 0
  
         Close Short:
             HHV(Mov(C,144,E),5) = HHV(Mov(C,144,E),13)
  
     OPTIMIZATION VARIABLES
     ----------------------
         OPT1: Min = -34.00  Max = -8.00  Step = 13.00
         OPT2: Min = -55.00  Max = -13.00  Step = 21.00
  
     STOPS ALL OFF

 ===========================================================================

 03_R2, S/C, CCI - All
     SIGNAL FORMULAS
     ---------------
         Enter Long:
             Alert(RSquared(C,21) < 0.15,13) AND  
              Tema(10000*LinRegSlope(C,34)/C,34) > opt1 AND
               HHV(Tema(10000*LinRegSlope(C,34)/C,34),5) =
               HHV(Tema(10000*LinRegSlope(C,34)/C,34),13) AND
                HHV(Tema(CCI(55),55),5) = HHV(Tema(CCI(55),55),13) AND
                 Tema(CCI(55),55) > 0 AND         
                  HHV(Mov(C,55,E),5) = HHV(Mov(C,55,E),13)
              
  
         Close Long:
             Tema(10000*LinRegSlope(C,34)/C,34) < opt1 AND
              LLV(Tema(CCI(55),55),5) = LLV(Tema(CCI(55),55),13) AND
               Tema(CCI(55),55) < 0 AND
                LLV(Tema(10000*LinRegSlope(C,34)/C,34),5) =
                LLV(Tema(10000*LinRegSlope(C,34)/C,34),13)
  
         Enter Short:
             Alert(RSquared(C,21) < 0.15,13)  AND
              Tema(10000*LinRegSlope(C,34)/C,34) < opt2 AND
               LLV(Tema(10000*LinRegSlope(C,34)/C,34),5) =
               LLV(Tema(10000*LinRegSlope(C,34)/C,34),13) AND
                LLV(Tema(CCI(55),55),5) = LLV(Tema(CCI(55),55),13) AND
                 LLV(Mov(C,144,E),5) = LLV(Mov(C,144,E),13)
  
         Close Short:
             HHV(Mov(C,144,E),5) = HHV(Mov(C,144,E),13) AND
               Tema(CCI(55),55) > 0
  
     OPTIMIZATION VARIABLES
     ----------------------
         OPT1: Min = -34.00  Max = -8.00  Step = 13.00
         OPT2: Min = -55.00  Max = -13.00  Step = 21.00
  
     STOPS ALL OFF

 ===========================================================================

 04_ROC, ema, ADXR, S/C - All
     SIGNAL FORMULAS
     ---------------
         Enter Long:
             Alert(Cross(Tema(ROC(C,55,%),55),0),21) AND
              Mov(C,21,E) > Ref(Mov(C,21,E),-13) AND
               ADXR(13) > opt1 AND
                Tema(10000*LinRegSlope(C,34)/C,34) > 0  
  
         Close Long:
             (Tema(ROC(C,55,%),55) < -5 AND
              Mov(C,21,E) < Ref(Mov(C,21,E),-3) AND
               Tema(10000*LinRegSlope(C,34)/C,34) < 0) OR
                Alert(Cross(opt2,Tema(ROC(C,55,%),55)),21) AND
                 Mov(C,21,E) < Ref(Mov(C,21,E),5) 
  
         Enter Short:
             Alert(Cross(-21,Tema(ROC(C,55,%),55)),13) AND
              Mov(C,55,E) < Ref(Mov(C,55,E),-8) AND
               ADXR(13) > opt1 AND
                Tema(10000*LinRegSlope(C,34)/C,34) < -5
  
         Close Short:
             (Tema(ROC(C,55,%),55) > 0 AND
              Mov(C,55,E) > Ref(Mov(C,55,E),-8) AND
               Tema(10000*LinRegSlope(C,34)/C,34) > 0) OR
                Alert(Cross(Tema(ROC(C,55,%),55),-opt2),21) AND
                 Mov(C,55,E) > Ref(Mov(C,55,E),-8) 
  
     OPTIMIZATION VARIABLES
     ----------------------
         OPT1: Min = 21.00  Max = 24.00  Step = 3.00
         OPT2: Min = 80.00  Max = 180.00  Step = 50.00
  
     STOPS ALL OFF