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

Re: Postings



PureBytes Links

Trading Reference Links

Stan,
     I use RSquared and LinRegSlope in several of my system tests.  I'll copy 
a previous post on them below.  Give them a try and let me know what you 
think.
______________________________________________________________________________
____
All,
     Ive been playing with my MetaStock System tests again.  As you know, 
when I plot a new stock I compare all my tests and go with the one that does 
best for that stock.  You will need two custom formulas for the tests.  The 
formulas and tests follow:
-------------------------------------------------------------------------
               MetaStock for Windows Indicator Builder

Momentum Time
  
     (H-Mov(C,55,T)+(L-Mov(C,55,T)))/(H-Mov(C,55,T)-(L-Mov(C,55,T)))

S/C (LinRegSlope/Close)
  
     10000*LinRegSlope(C,34)/C
MetaStock for Windows System Tester
  
 ============================================================================
 01_R2, S/C, MFI, TSF - (Vol Rqd)
     SIGNAL FORMULAS
     ---------------
         Enter Long:
              Alert(RSquared(C,21) < 0.15,13) AND  
               Fml("S/C") > opt1 AND
                HHV(Fml("S/C"),5) = HHV(Fml("S/C"),13) AND
                 HHV(MFI(55),5) = HHV(MFI(55),13) AND
                  HHV(Mov(C,55,E),5) = HHV(Mov(C,55,E),13) 
  
         Close Long:
              Alert(Cross(TSF(C,233),C),13) AND
               LLV(Mov(C,55,E),5) = LLV(Mov(C,55,E),13) AND
                Fml("S/C") < opt1
  
         Enter Short:
              Alert(RSquared(C,21) < 0.15,13)  AND
               Fml("S/C") < opt2 AND
                LLV(Fml("S/C"),5) = LLV(Fml("S/C"),13) AND
                 LLV(MFI(55),5) = LLV(MFI(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) 
               
  
     OPTIMIZATION VARIABLES
     ----------------------
         OPT1: Min = -89.00  Max = -21.00  Step = 34.00
         OPT2: Min = -89.00  Max = -21.00  Step = 34.00
  
     STOPS ALL OFF
 ============================================================================
 02_R2, S/C, CMO - All
     SIGNAL FORMULAS
     ---------------
         Enter Long:
              Alert(RSquared(C,21) < 0.15,13) AND  
               Fml("S/C") > opt1 AND
                HHV(Fml("S/C"),5) = HHV(Fml("S/C"),13) AND
           CMO(C,55) > 0
  
         Close Long:
               Fml("S/C") < opt1 AND
                LLV(CMO(C,55),5) = LLV(CMO(C,55),13)
  
         Enter Short:
              Alert(RSquared(C,21) < 0.15,13)  AND
               Fml("S/C") < opt2 AND
                LLV(Fml("S/C"),5) = LLV(Fml("S/C"),13) AND
                 CMO(C,55) < 0 AND
                  LLV(Mov(C,144,E),5) = LLV(Mov(C,144,E),13) AND
                   TRIX(55) < 0 
  
         Close Short:
              HHV(Mov(C,144,E),5) = HHV(Mov(C,144,E),13)
  
     OPTIMIZATION VARIABLES
     ----------------------
         OPT1: Min = -89.00  Max = -21.00  Step = 34.00
         OPT2: Min = -89.00  Max = -21.00  Step = 34.00
  
     STOPS ALL OFF
     
 ============================================================================
 03_R2, S/C, Qstick - (OHLC Rqd)
     SIGNAL FORMULAS
     ---------------
         Enter Long:
              Alert(RSquared(C,21) < 0.15,13) AND  
               Fml("S/C") > opt1 AND
                HHV(Fml("S/C"),5) = HHV(Fml("S/C"),13) AND
                 Qstick(21) > 0 AND
                  HHV(Qstick(21),5) = HHV(Qstick(21),13) AND
                   HHV(Mov(C,55,E),5) = HHV(Mov(C,55,E),13)
     
         Close Long:
              Fml("S/C") < opt1 AND
               LLV(Qstick(21),5) = LLV(Qstick(21),13)
  
         Enter Short:
              Alert(RSquared(C,21) < 0.15,13)  AND
               Fml("S/C") < opt2 AND
                LLV(Fml("S/C"),5) = LLV(Fml("S/C"),13) AND
                 Qstick(21) < 0 AND
                  LLV(Qstick(21),5) = LLV(Qstick(21),13) AND
                   LLV(Mov(C,144,E),5) = LLV(Mov(C,144,E),13) AND 
                    C = LLV(C,5)

          Close Short:
              HHV(Mov(C,144,E),5) = HHV(Mov(C,144,E),13)
  
     OPTIMIZATION VARIABLES
     ----------------------
         OPT1: Min = -89.00  Max = -24.00  Step = 34.00
         OPT2: Min = -89.00  Max = -21.00  Step = 34.00
  
     STOPS ALL OFF
 ============================================================================
 04_R2, S/C, CCI, TSF - All
     SIGNAL FORMULAS
     ---------------
         Enter Long:
              Alert(RSquared(C,21) < 0.15,13) AND  
               Fml("S/C") > opt1 AND
                HHV(Fml("S/C"),5) = HHV(Fml("S/C"),13) AND
                 HHV(CCI(55),5) = HHV(CCI(55),13) AND
                  CCI(55) > 0 AND         
                   HHV(Mov(C,55,E),5) = HHV(Mov(C,55,E),13)
  
         Close Long:
              LLV(TSF(C,55),5) = LLV(TSF(C,55),13) AND
               Fml("S/C") < opt1 AND
                LLV(CCI(55),5) = LLV(CCI(55),13) 
  
         Enter Short:
              Alert(RSquared(C,21) < 0.15,13)  AND
               Fml("S/C") < opt2 AND
                LLV(Fml("S/C"),5) = LLV(Fml("S/C"),13) AND
                 LLV(CCI(55),5) = LLV(CCI(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) 
  
     OPTIMIZATION VARIABLES
     ----------------------
         OPT1: Min = -89.00  Max = -21.00  Step = 34.00
  
         OPT2: Min = -89.00  Max = -21.00  Step = 34.00
  
     STOPS ALL OFF
 ============================================================================
 05_R2, S/C, TRIX - All
     SIGNAL FORMULAS
     ---------------
         Enter Long:
              Alert(RSquared(C,21) < 0.15,13) AND  
               Fml("S/C") > opt1 AND
                HHV(Fml("S/C"),5) = HHV(Fml("S/C"),13) AND
                 TRIX(21) > Mov(TRIX(21),55,T) AND
                  HHV(TRIX(21),5) = HHV(TRIX(21),13)
  
         Close Long:
               Fml("S/C") < opt1 AND
                TRIX(21) < Mov(TRIX(21),55,T)
  
         Enter Short:
              Alert(RSquared(C,21) < 0.15,13)  AND
               Fml("S/C") < opt2 AND
                LLV(Fml("S/C"),5) = LLV(Fml("S/C"),13) AND
                 TRIX(21) < Mov(TRIX(21),55,T) 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
               TRIX(21) > Mov(TRIX(21),55,T)
  
     OPTIMIZATION VARIABLES
     ----------------------
         OPT1: Min = -89.00  Max = -21.00  Step = 34.00
         OPT2: Min = -89.00  Max = -21.00  Step = 34.00
  
     STOPS ALL OFF
 ============================================================================
 06_ROC, TSF, ADXR, S/C - All
     SIGNAL FORMULAS
     ---------------
         Enter Long:
             Alert(Cross(ROC(C,21,%),-5),21) AND
              HHV(Mov(C,21,E),5) = HHV(Mov(C,21,E),13) AND
               ADXR(13) > opt1 AND
                Fml("S/C") > -5
  
         Close Long:
              C < TSF(C,233) AND 
               ROC(C,21,%) < 0 AND
                LLV(Mov(C,21,E),5) = LLV(Mov(C,21,E),13) AND
                 ADXR(13) < opt1 
  
         Enter Short:
             Alert(Cross(-10,ROC(C,21,%)),13) AND
              LLV(Mov(C,144,E),5) = LLV(Mov(C,144,E),13) AND
               ADXR(13) > opt2 AND
                C < Mov(C,55,E) AND
                 Fml("S/C") < -8
  
         Close Short:
              HHV(Mov(C,144,E),5) = HHV(Mov(C,144,E),13) AND
               Fml("S/C") > -8 
  
     OPTIMIZATION VARIABLES
     ----------------------
         OPT1: Min = 21.00  Max = 27.00  Step = 3.00
         OPT2: Min = 25.00  Max = 35.00  Step = 5.00
  
     STOPS ALL OFF
 ============================================================================
 07_Three Moving Average System
     SIGNAL FORMULAS
     ---------------
         Enter Long:
             HHV(Mov(C,opt1,E),5) = HHV(Mov(C,opt1,E),13) AND
              HHV(Mov(C,opt2,E),5) = HHV(Mov(C,opt2,E),13) AND
               HHV(Mov(C,opt3,E),5) = HHV(Mov(C,opt3,E),13) 

         Close Long:
             LLV(Mov(C,opt1,E),5) = LLV(Mov(C,opt1,E),13) AND
              LLV(Mov(C,opt2,E),5) = LLV(Mov(C,opt2,E),13)
  
         Enter Short:
             LLV(Mov(C,opt1,E),5) = LLV(Mov(C,opt1,E),13) AND
              LLV(Mov(C,opt2,E),5) = LLV(Mov(C,opt2,E),13) AND
               LLV(Mov(C,opt3,E),5) = LLV(Mov(C,opt3,E),13) 
  
         Close Short:
             HHV(Mov(C,opt1,E),5) = HHV(Mov(C,opt1,E),13) AND
              HHV(Mov(C,opt2,E),5) = HHV(Mov(C,opt2,E),13)
  
     OPTIMIZATION VARIABLES
     ----------------------
         OPT1: Min = 13.00  Max = 21.00  Step = 8.00
         OPT2: Min = 55.00  Max = 89.00  Step = 34.00
         OPT3: Min = 144.00  Max = 233.00  Step = 89.00
  
     STOPS ALL OFF
 ============================================================================
 08_Momentum Time & S/C
     SIGNAL FORMULAS
     ---------------
         Enter Long:
             Alert(Cross(Fml("Momentum Time"),0),13) AND
              C > Mov(C,21,T) AND 
               Fml("S/C") > 0 AND
                HHV(Fml("S/C"),5) = HHV(Fml("S/C"),13)  
  
         Close Long:
              Fml("S/C") < opt1
  
         Enter Short:
             Alert(Cross(0,Fml("Momentum Time")),13) AND
              C < Mov(C,21,T) AND 
               Fml("S/C") < opt1 AND
                LLV(Fml("S/C"),5) = LLV(Fml("S/C"),13)  
  
         Close Short:
             Fml("S/C") > 0
  
     OPTIMIZATION VARIABLES

         OPT1: Min = -89.00  Max = -21.00  Step = 34.00
  
     STOPS ALL OFF
-------------------------------------------------------------------------
Jim
  



-----Original Message-----
From:	S Childs 
Sent:	Tuesday, June 10, 1997 8:36 PM
To:	metastock-list@xxxxxxxxxxxxx
Subject:	Unidentified subject!

I was experimenting with shifted MA's awhile back and found through
optimization one the seemed pretty good on the Yen. (I was using the 
spot at the time) anyway the system gave a long signal six days late(the
forward shift was six) and I established a long in the Yen May 6th. Now
on to the next part. Has anyone experimented with Rsquared and Linear
Regression Slope to establish an exit point either in combination with MA's
or not?  I plan to try an optimization routine but I know many in this forum
are way ahead of me here and can add some very useful input. Thanks!

Stan Childs
Tradewinds North, Inc
Stanley W. Childs-CEO
HC 83 Box 466
Pequot Lakes, MN 56472
Telephone 218-543-4445
Fax 218-543-6835






  • References: