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

MS6.5 Binary Wave Profit System Test



PureBytes Links

Trading Reference Links

All,
     I've tweaked my existing MS 6.5 formulas, profit system tests,
explorations, and expert and added a
binary wave test.  I sent an MS 6.5 import file with the revised
formulas to everyone on my MS 6.5 formula
list.  If someone isn't on the list and wants to be added, just yell.
      I thought I'd take this opportunity to explain the binary wave
test.  The basic idea behind a MetaStock
binary wave is to use if statements on several MetaStock indicators
and have them return plus one for a
bullish indication, minus one for a bearish indication, and zero for a
neutral condition.  Then you add them
all up for your binary wave indicator.  I decided to format all my
indicators so they would plot as a
histogram.  For my indicators plotting as histograms, positive is
bullish and negative is bearish.  To cut
down on whipsaws, I decided that over +5 would be bullish, under -13
would be bearish and anything in
between would be neutral.  Therefore my binary wave formulas are:
     BW2 Demand Index
          If(Tema(DI(),21) > 5,+1,If(Tema(DI(),21) < -13,-1,0))
     BW3 Linear Regression Slope
          If(Tema(10000*LinRegSlope(C,34)/C,34) > 5,+1,
          If(Tema(10000*LinRegSlope(C,34)/C,34) < -13,-1,0))
     BW4 CCI
          If(Tema(CCI(21),21) > 5,+1, If(Tema(CCI(21),21) < -13,-1,0))
     BW5 ROC
          If(Tema(ROC(C,21,%),21) > 5,+1,If(Tema(ROC(C,21,%),21)
< -13,-1,0))
     BW6 Money Flow
          If(Tema(MFI(21),21)-50 > 5,+1,If(Tema(MFI(21),21)-50
< -13,-1,0))
     BW7 CMO
          If(Tema(CMO(C,21),21) > 5,+1,If(Tema(CMO(C,21),21)
< -13,-1,0))
     BW8 VAR ma
          If(Mov(C,21,VAR) > Mov(C,55,VAR) AND HHV(Mov(C,233,VAR),5) =
         HHV(Mov(C,233,VAR),13),+1,If(Mov(C,21,VAR) < Mov(C,55,VAR)
AND
         LLV(Mov(C,233,VAR),5) = LLV(Mov(C,233,VAR),13),-1,0))
The next formula just adds up the binary wave.
     BW Add
          Fml("BW2") + Fml("BW3") + Fml("BW4") + Fml("BW5") +
Fml("BW6") + Fml("BW7") +
          Fml("BW8")
Next, I decided to do something a little different.  Since the whole
purpose of this test is to catch a trending
stock, I decided to add an amplifier that would get larger as the
trend got stronger.  Since I like Fibonacci
numbers, I decided to use Rsquared as a measure of trend strength and
base my amplifier on Fibonacci
numbers.  The formula I finally came up with after a lot of tinkering
follows.
     BW Amplifier
          If(RSquared(C,21) > 0.8,5,If(RSquared(C,21) >
0.6,3,If(RSquared(C,21) > 0.4,2,
          If(RSquared(C,21)>0.2,1,0))))
The last step in constructing the binary wave was to decide on the
smoothing and put it all together.  Of course, I used tema smoothing.
    Tema Binary Wave Composite
          Tema(Fml("BW Add")*Fml("BW Amplifier"),21)
     The final step is to come up with a system test for the Tema
Binary Wave Composite.  Using the same
rationale that I used on the Tema DI S/C that I explained a few weeks
ago, I decide on a +8 crossover for
my buy trigger and an optimized negative crossover for my sell
trigger.  I found that using optimized
numbers for closing the long and entering the short worked best.  I
try to optimize just enough to get the
test in the right ball park without over optimizing to the extent that
I curve fit.  Using cross over of positive
and negative values that envelope the zero line for signals rather
then the zero cross over helps reduce
whipsaws.  I also used the Alert function rather then just the cross
over so I could confirm with other
signals within a 13 day period.  I decided to use Qstick and C being
higher then the previous high or lower
then the previous low for confirmations to reduce false signals.
Therefore my buy signal became:
     Enter Long
          Alert(Cross(Fml("Binary Wave"),8),13) AND
           Tema(Qstick(34),34) > 0 AND
             C > Ref(H,-1)
My sell signal became:
     Enter Short
          Alert(Cross(-opt2,Fml("Binary Wave")),8) AND
           Tema(Qstick(34),34) < 0 AND
            C < Ref(L,-1)
Finally I wanted exit conditions that were less then full signal
reversals, so I used the following
     Exit Long
          Fml("Binary Wave") < -opt1 AND
           Tema(Qstick(34),34) < 0
     Exit Short
          Fml("Binary Wave") > 0 AND
           Tema(Qstick(34),34) > 0
Finally I also used Fibonacci numbers for my optimization
     Opt 1:  Min 3, Max 13, Step 5
     Opt 2:  Min 8, Max 34, Step 13
     That's it.  I'd appreciate any comments, ideas, or suggestions
for improvements.
Jim