

MetaStock System Test 04  Tema PV Binary Wave, StochRSI_21 


I've been very busy and got away from the discussion of my MetaStock System tests.
This week I'm going to get back on track and discuss my fourth MetaStock Profit System Test  04_Tema PV Binary Wave, StochRSI_21.
As you may recall from my post last fall, I wanted to develop a binary wave and a binary wave system test based on price and volume patterns to supplement my indicator  Binary Wave Composite. I didn't want to use any indicators except price and volume. I'd hoped to use all the old sayings such as higher highs and higher lows are bullish, breakouts and big moves on large volume, etc. I developed the binary wave with the help and participation of several on this forum.
After a lot of experimenting, we came up with the following Binary wave formulas: 

PVBW01 (Highs & Lows)
If(HHV(L,8) = HHV(L,21),2,0) + If(HHV(L,21) = HHV(L,55),2,0) +
If(HHV(L,55) = HHV(L,233),1,0) + If(HHV(H,8) = HHV(H,21),2,0) +
If(HHV(H,21) = HHV(H,55),2,0) + If(HHV(H,55) = HHV(H,233),1,0) +
If(LLV(H,8) = LLV(H,21),2,0) + If(LLV(H,21) = LLV(H,55),2,0) +
If(LLV(H,55) = LLV(H,233),1,0) + If(LLV(L,8) = LLV(L,21),2,0) +
If(LLV(L,21) = LLV(L,55),2,0) + If(LLV(L,55) = LLV(L,233),1,0)


PVBW02 (High Vol Move)
If(Mov(V,3,S) > 1.02*Mov(V,21,S),1,0) * If(C > Ref(H,1),2,0) +
If(Mov(V,2,S) > 1.02*Mov(V,21,S),1,0) * If(C < Ref(L,1),2,0)


PVBW03 (New 233 Day High or Low)
((If(Mov(V,2,S) > 1.02*Mov(V,21,S),1,0)) * If((H = HHV(H,233)),3,0)) +
((If(Mov(V,2,S) > 1.02*Mov(V,21,S),1,0)) * If((L = LLV(L,233)),3,0))


PVBW04 (Price Look Back)
(2*(CRef(C,21)) + 2*(CRef(C,55)) + (CRef(C,233)))/C


The idea behind PVBW01 was the old idea that higher highs and higher lows are bullish and lower lows and lower highs are bearish. We decided that it made sense to test for short, intermediate, and long term indications. We used the Fibonacci values of 21, 55, and 233 days for short, intermediate, and long term moving averages. After a lot of experimenting, we gave more weight to the short and intermediate term results.
The idea behind PVBW02 was that a close above yesterdays high is bullish if it happens on good volume. Conversely, a close below yesterdays low is bearish if it happens on good volume. After more experimenting, we assigned a weight of +2 and 2 when these conditions were met.
The idea behind PVBW03 is similar except we use new yearly highs and lows. We also assign more weight for meeting this condition.
The idea behind PVBW04 is different. I wanted a look back indicator of some sort as the final component. I started with a 21, 55, and 233 day look back of the close and made it bullish or bearish just on comparing the two closing prices. However, when I got to thinking about this I thought it was just another way of getting the same results as our first binary wave. What I really wanted was momentum, so I came up with the idea of subtracting the two closes, assigning different weightings (our old 2, 2, 1) relationship, and then dividing by the closing price to normalize the results so there wouldn't be differences between low and high priced stocks.
To get the final PVBW formula, I first had to add each together with the following formula: 

PVBW Add
Fml("PVBW01") + Fml("PVBW02") + Fml("PVBW03") + Fml("PVBW04")


Finally the last formula applies Tema Smoothing as follows: 

Tema PV Binary Wave
Periods := Input("Enter Tema Smoothing Periods",8,55,21);
Tema(Fml("PVBW Add"),Periods)


After we got the formula, the next challenge was how to test it. To develop the PVBW we used a simple zero cross over test to determine the appropriate variables for each of the Binary Wave components.
The original test was: 

MS System Test 04  Tema PV Binary Wave
Enter Long :
Cross(Fml("Tema PV Binary Wave"),0)
Enter Short :
Cross(0,Fml("Tema PV Binary Wave"))




We improved that considerably and came up with the following test: 

MS System Test 04  Tema PV Bin W, StochRSI_21
Enter Long :
(Cross(Fml("Tema PV Binary Wave"),opt1) AND Fml("Tema StochRSI_21") > 0) OR
(Cross(Fml("Tema StochRSI_21"),0) AND Fml("Tema PV Binary Wave") > 0)
Close Long :
Fml("Tema PV Binary Wave") < opt1 AND Fml("Tema StochRSI_21") < 0
Enter Short :
Fml("Tema PV Binary Wave") < opt2 AND Fml("Tema StochRSI_21") < 0.1*opt2
Close Short :
Fml("Tema PV Binary Wave") > 0 AND Fml("Tema StochRSI_21") > 0
Optimization :
Opt1: Min = 5, Max = +5, Step = +5
Opt2: Min = 8, Max = 2, Step = +3


Before I discuss the test, I first need the following formula: 

Tema StochRSI_21
Periods := Input("Enter Periods",5,233,21);
Tema(((RSI(Periods)  LLV(RSI(Periods ),Periods)) /
((HHV(RSI(Periods),Periods))  LLV(RSI(Periods),Periods)))  0.5,periods)




That's just the standard stochRSI formula that I tweaked to allow use of Fibonacci numbers and Tema smoothing.
Now back to the test. We get a enter long signal when the Tema PV Binary Wave crosses an optimized number and is confirmed by Tema StochRSI_21 being greater than 0 or when Tema StochRSI_21 crosses 0 and is confirmed by Tema PV Binary Wave being greater than 0. We get a close long signal when both Tema PV Binary Wave is less than minus opt1 and Tema StochRSI_21 is less than 0. Since the market is biased upwards, we want the short signals to be based on tougher critera, Therefore the enter Short signal is only generated when both the Tema PV Binary Wave and the Tema stochRSI are less than an optimized number. We close the Short when both are above 0.
from Jim Greening 

Source / From: 
TOP 
http://www.guppytraders.com 

