MetaStock System Test 01  R2,S/C,MFI (Vol Required)

The RSquared, S/C,MFI test is based on linear regression. RSquared is a linear regression function that measures how strong a data array of given length is trending. It's really based on correlation. A return of one correlates to a very strong trend in either direction that rises or falls one point per day. A return of zero correlates to no trend.

I'm using RSquared 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 5 to 13 days. If one does start we want to determine the direction and get in early. Therefore I use RSquared as my trigger, combining it with the ALERT function. With the ALERT given by RSquared being less then 0.15, then we will get a buy signal if all my other conditions are met within a 13-day period that I also set with the ALERT function. For the other conditions, I'm using S/C, MFI, and the 55-day Variable Moving Average (vma) 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. Therefore my formula for Tema S/C becomes:

Tema S/C

Periods := Input("Enter Periods",1,233,34);

Tema(10000*LinRegSlope(C,Periods)/C,Periods)

The theory is that if Tema S/C is rising then a up trend is in progress. If Tema S/C is falling a downtrend 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 that it is really rising. 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 both the MFI and the 55-day vma are also rising. I use a Tema MFI formula which is just the tema smoothed MFI - 50 so it can be plotted as a histogram. The formula is:

Tema MFI

Periods := Input("Enter Tema Smoothing Periods",13,55,55);

Tema(MFI(Periods),Periods) - 50

When all conditions are met within 13 days of the alert, we get a buy signal. The converse is true for a sell signal. Since the market is biased upwards, I use an additional check for the short - Tema MFI less then 0. 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 that both are falling. Short positions tend to move faster, so I only look for the Tema MFI to be greater than zero and the 55 day vma to begin rising to close that position. The complete test follows:

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

Tema(10000*LinRegSlope(C,34)/C,34) < opt1 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),1

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,55,VAR),5) = LLV(Mov(C,55,VAR),13)

CLOSE SHORT

HHV(Mov(C,55,VAR),5) = HHV(Mov(C,55,VAR),13) AND

Tema(MFI(55),55) - 50 > 0

OPTIMIZATION:

OPT1: Min=-34 Max=-8 Step=13

OPT2: Min=-55 Max=-21 Step=34

Although I have Tema S/C and Tema MFI defined as custom formulas so I can plot them as indicators on my charts, I don't call the custom formulas in the tests. Instead I use the actual formulas. The reason I do this, is that the test will run faster when the formulas are used direct instead of calling for the custom formulas.

from Jim Greening   www.geocities.com

 

 

MetaStock System Test 02Tema Binary Wave Composite, QStick

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 could be plotted as a histogram. For these 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) > 2,+1,If(Tema(ROC(C,21,%),21) <

-2,-1,0))

BW6 Money Flow

If(Tema(MFI(21),21)-50 > 5,+1,If(Tema(MFI(21),21)-50

< -5,-1,0))

BW7 CMO

If(Tema(CMO(C,21),21) > 5,+1,If(Tema(CMO(C,21),21)

< -5,-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.5))))

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

Periods := Input("Enter Tema Smoothing

Periods",8,233,21);

Tema(Fml("BW Add")*Fml("BW Amplifier"),Periods)

The final step is to come up with a system test for the Tema Binary Wave Composite. Remember, the binary wave is just made up of a bunch of technical indicators that I give a +1 value when bullish, 0 when neutral, and -1 when bearish. Then they are summed and smoothed. So in general a positive value is bullish and a negative value is bearish. Also a rising number is bullish and a falling number is bearish. Therefore you could use a zero crossover to the upside as a buy signal and a crossover to the downside as a sell signal. If you had a good algorithm, you could also use a rise from a negative peak (or trough) as a buy signal and a fall from a positive peak as a sell signal. I decided to use a 8 day moving average of the BW with a crossover of the BW for my algorithm in an attempt to get an early signal on a rise from a negative peak. It does have the disadvantage of finding way too many peaks so I only use it as an Alert. For confirmation I use the QStick function and a variable moving average function.

QStick was developed by Chande as a way to quantify candlesticks. Since the difference between the open and close prices lies at the heart of candlestick charting, QStick is simply a moving average of that difference. Negative values of QStick correlate to black candlesticks, positive values to white candlesticks. Since in general black candles are bearish and white candles are bullish, this indicator can also be plotted as a histogram and interpreted the same was as the Binary Wave. The formula is:

Periods := Input("Enter Periods",1,233,34);

Tema(Qstick(Periods),Periods)

Now to get my open long signal I use the ALERT signal with an 8 day vma BW crossover of the BW. Then to actually get the signal, I have to have both the QStick rising and the 21 day vma greater then the 55 day vma.

Therefore my buy signal became:

Enter Long

Alert(Cross(Fml("Tema Binary Wave Comp"),

Mov(Fml("Tema Binary Wave Comp"),8,S)),21) AND

HHV(Tema(Qstick(34),34),5) = HHV(Tema(Qstick(34),34),13) AND

Mov(H,21,VAR) > Mov(H,55,VAR)

Since the market has an upward bias, I wanted my sell signal to be more restrictive. Therefore instead of trying to catch a fall from a positive peak as my sell alert, I wanted a crossover of an optimized negative number. I still used QStick and vma to confirm and also added that the close should be lower than yesterdays low.

Therefore, my sell signal became:

Enter Short

Alert(Cross(-opt2,Fml("Tema Binary Wave Comp")),8) AND

Tema(Qstick(34),34) < -0.1 AND

C < Ref(L,-1) AND

Mov(L,21,VAR) < Mov(L,55,VAR)

Then I wanted exit conditions that were less then full signal reversals. I decided that the BW being less than a negative number would be my primary close long signal, but I also wanted confirmation from other indicators. After a lot of trial and error I used the following:

Close Long

Fml("Tema Binary Wave Comp") < -opt1 AND

Tema(Qstick(34),34) < 0 AND

LLV(Mov(L,21,VAR),5) = LLV(Mov(L,21,VAR),13)

Close Short

Fml("Tema Binary Wave Comp") > 0 AND

Tema(Qstick(34),34) > 0.08

Finally I also used Fibonacci numbers for my optimization:

Opt 1: Min 3, Max 13, Step 5

Opt 2: Min 3, Max 13, Step 5

 

MetaStock System Test 03  Tema PDI - MDI, ADX (Vol Required)

My third MetaStock Profit System Test is based on Wilder's directional movement indicators. As the MetaStock manual indicates, Wilder says a buy signal occurs when PDI - MDI moves above zero and a sell signal occurs when PDI-MDI falls below zero. I started with that thought and experimented a little. Wilder used 14 day periods to calculate his PDI and MDI functions. Since I like Fibonacci numbers, I used 13 days instead. Also I like to smooth my indicators so I used Tema smoothing. My custom PDI - MDI formula then became:

Tema PDI - MDI

Periods := Input("Enter Tema Smoothing Periods",8,55,13);

Tema(PDI(13) - MDI(13),Periods)

I started with the idea that I would take the PDI-MDI crossover of an optimized number as my basic buy and sell trigger. However, this number did not have to be zero and did not have to be the same for entering long and entering short. After a lot of trial an error I decide -1, -3, or -5 would be my enter long number and -5, -13, or -21 would be my enter short number. This makes sense since the market is biased to the up side, so entering a little under zero would get us in a little earlier. Also down moves tend to be fast an extreme and this would only let us in short for larger, faster down moves which is what I wanted. Finally I wanted some way to reduce the number of false signals and I wanted to do that with directional movement indicators only so this test would be completely uncorrelated with my other tests.

For long positions, I notice that most up moves started when adx was low and that adx climbed during the move to a max and then started to fall at the end of the move. Therefore, I thought an adx max and min for a buy signal would help reduce false signals. After some experimenting, I set the min at 8 and the max at 21. I also noticed that most good buy points occurred when MDI and ADX were close together so I decided that the difference between the two should be small. After more experimenting, I decided on the following for my open long signal:

Open Long:

Alert(Cross(Fml("Tema PDI - MDI"),opt1),13) AND

MDI(13) - ADX(13) <= 4 AND

MDI(13) - ADX(13) >= -2 AND

ADX(13) >= 8 AND

ADX(13) <= 21

To close my open long position I wanted the PDI-MDI to be less than opt1. When a stock starts to drop, the MDI starts to rise, so I wanted the MDI to be greater than a certain number to close a position. Finally, since markets are biased upwards, I also wanted the 55 day variable moving average to be dropping before I closed the position. Therefore, the close long became:

Close Long:

Fml("Tema PDI - MDI") < opt1 AND

MDI(13) > 21 AND

LLV(Mov(L,55,VAR),5) = LLV(Mov(L,55,VAR),13)

To open a short position, I wanted the PDI-MDI to cross below a fairly high negative number. I wanted confirmation in that the adx was still fairly high when that happened. The answer was:

Open Short:

Alert(Cross(opt2,Fml("Tema PDI - MDI")),8) AND

ADX(13) > 34

To close the short position, I only wanted PDI-MDI to be greater than a certain positive number. I don't like a lot of confirmations for closing shorts. With the bias being up, you need to close shorts fast. My close Short and optimization became:

Close Short:

Fml("Tema PDI - MDI") > 13

Optimization:

Opt1: Min = -1 Max = -5 Step = 2

Opt2: Min = -21 Max = -5 Step = 8

 

 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*(C-Ref(C,-21)) + 2*(C-Ref(C,-55)) + (C-Ref(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:

05_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:

04_Tema PV Binary Wave, 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.

 

MetaStock System Test 05 Tema StochRSI_13 & 55

For my last MetaStock system test, (05_StochRSI_13 & 55) I used the StochRSI formula described at the Equis site then modified it slightly. The original formula was:

( ( RSI ( 14 ) - LLV( RSI (14 ) ,14 ) ) / ( ( HHV( RSI (14 ) ,14 ) ) - LLV(RSI (14 ),14 ) ) )

I didn't want to use a specific number such as 14 for my formula, but want to be able to use my favorite Fibonacci numbers. I also wanted to smooth the formula with Tema smoothing. I finally settled on the Fibonacci numbers of 13 and 55 for my formulas. I also subtracted 0.5 from the result so I could plot the formula as a histogram. Therefore my formulas became:

Tema StochRSI_13

Periods := Input("Enter Tema Smoothing Periods",5,233,13);

Tema(((RSI(Periods) - LLV(RSI(Periods),Periods)) / ((0.0001 + HHV(RSI(Periods),Periods)) - LLV(RSI(Periods),Periods))) -0.5,Periods)

---------------------------------------------------------------------------------

Tema StochRSI_55

Periods := Input("Enter Tema Smoothing Periods",5,233,55);

Tema(((RSI(Periods) - LLV(RSI(Periods),Periods)) / ((0.0001+HHV(RSI(Periods),Periods)) - LLV(RSI(Periods),Periods))) -0.5,Periods)

After I decided on the formulas, the next step was how to use them in a system test. I plotted the two formulas above several of my favorite stocks and looked at them for buying patterns. Since they are plotted as a histogram I looked at zero crossovers to the upside as buys and to the downside as sells. Then instead of a zero crossover, I used an optimized value crossover. After some experimenting, I found that the shorter length crossover gave better signals if I also required the longer length one to be negative, and confirmed an up move by also requiring that a short term moving average was moving up. Finally I saw that there was usually a good buy signal when the longer term formula crossed the optimized value and the shorter term formula was above zero. Therefore my open long signal became:

OPEN LONG:

(Alert(Cross(Fml("Tema StochRSI_13"),opt1),21) AND

Fml("Tema StochRSI_55") < 0 AND

Mov(C,21,VAR) > Ref(Mov(C,21,VAR),-8)) OR

Alert(Cross(Fml("Tema StochRSI_55"),opt1),13) AND

Fml("Tema StochRSI_13") > 0

I couldn't find a good close long signal, but did find that a reverse to a short on the longer term StochRSI crossing an optimized value confirmed by a falling moving average seemed to work well. Therefore my Open Short became:

OPEN SHORT:

Alert(Cross(opt2,Fml("Tema StochRSI_55")),13) AND

Mov(C,21,VAR) < Ref(Mov(C,21,VAR),-8)

The optimization valiues are:

opt1: Min = -0.3 Max = 0 Step = 0.1

opt2: Min = -0.3 Max = 0 Step = 0.1

That's all there is to the StochRSI test, but it seems to work very well for some stocks. Try it and let me know what you think.

 

MetaStock System Test 05 Tema StochRSI_13 & 55

For my last MetaStock system test, (05_StochRSI_13 & 55) I used the StochRSI formula described at the Equis site then modified it slightly. The original formula was:

( ( RSI ( 14 ) - LLV( RSI (14 ) ,14 ) ) / ( ( HHV( RSI (14 ) ,14 ) ) - LLV(RSI (14 ),14 ) ) )

I didn't want to use a specific number such as 14 for my formula, but want to be able to use my favorite Fibonacci numbers. I also wanted to smooth the formula with Tema smoothing. I finally settled on the Fibonacci numbers of 13 and 55 for my formulas. I also subtracted 0.5 from the result so I could plot the formula as a histogram. Therefore my formulas became:

Tema StochRSI_13

Periods := Input("Enter Tema Smoothing Periods",5,233,13);

Tema(((RSI(Periods) - LLV(RSI(Periods),Periods)) / ((0.0001 + HHV(RSI(Periods),Periods)) - LLV(RSI(Periods),Periods))) -0.5,Periods)

---------------------------------------------------------------------------------

Tema StochRSI_55

Periods := Input("Enter Tema Smoothing Periods",5,233,55);

Tema(((RSI(Periods) - LLV(RSI(Periods),Periods)) / ((0.0001+HHV(RSI(Periods),Periods)) - LLV(RSI(Periods),Periods))) -0.5,Periods)

After I decided on the formulas, the next step was how to use them in a system test. I plotted the two formulas above several of my favorite stocks and looked at them for buying patterns. Since they are plotted as a histogram I looked at zero crossovers to the upside as buys and to the downside as sells. Then instead of a zero crossover, I used an optimized value crossover. After some experimenting, I found that the shorter length crossover gave better signals if I also required the longer length one to be negative, and confirmed an up move by also requiring that a short term moving average was moving up. Finally I saw that there was usually a good buy signal when the longer term formula crossed the optimized value and the shorter term formula was above zero. Therefore my open long signal became:

OPEN LONG:

(Alert(Cross(Fml("Tema StochRSI_13"),opt1),21) AND

Fml("Tema StochRSI_55") < 0 AND

Mov(C,21,VAR) > Ref(Mov(C,21,VAR),-8)) OR

Alert(Cross(Fml("Tema StochRSI_55"),opt1),13) AND

Fml("Tema StochRSI_13") > 0

I couldn't find a good close long signal, but did find that a reverse to a short on the longer term StochRSI crossing an optimized value confirmed by a falling moving average seemed to work well. Therefore my Open Short became:

OPEN SHORT:

Alert(Cross(opt2,Fml("Tema StochRSI_55")),13) AND

Mov(C,21,VAR) < Ref(Mov(C,21,VAR),-8)

The optimization valiues are:

opt1: Min = -0.3 Max = 0 Step = 0.1

opt2: Min = -0.3 Max = 0 Step = 0.1

That's all there is to the StochRSI test, but it seems to work very well for some stocks. Try it and let me know what you think.

from Jim Greening

 

DONCHAIN CHANNELS

My understanding is that Donchian Channels are channels formed by the highest high and lowest low in the last 20 days (traditionally). The MetaStock code for the indicator would then be:

Periods:= Input("Enter number of periods", 20, 60, 20);

UpperChannelLine:= Ref(HHV(HIGH, Periods), -1);

LowerChannelLine:= Ref(LLV(LOW, Periods), -1);

UpperChannelLine; LowerChannelLine

from Glen Wallace

 

Culumative Volume (Variation) Indicator

TotalVolume:=LastValue(Cum(V));

n := TotalVolume - Input("Float Volume", 1, 100000000000, 100000000);

TrueDays:=(LastValue(BarsSince(Cum(V)<=n)))-1;

HighestSince(1,(BarsSince(Cum(V)<=n)>0),LastValue(HHV((HighestSince(1,(BarsSince(Cum(V)<=n)>0),Ref(H,-1))),TrueDays)));

LowestSince(1,(BarsSince(Cum(V)<=n)>0),LastValue(LLV((LowestSince(1,(BarsSince(Cum(V)<=n)>0),Ref(L,-1))),TrueDays)))

{from Erich Kohlhofer}

 

Average of Multiple Moving Averages (based on ideas of Linda Bradford Raschke)}

Formula:

{written by Ton Maas for use in MetaStock}

DN:=1;

HN:=2;

HN3:=DN+HN;

HN4:=HN+HN;

HN5:=HN+HN+DN;

HN6:=HN+HN+HN;

HN7:=HN+HN+HN+DN;

n:=50;

sOne:=((n-DN)/HN)*C+

((n-HN3)/HN)*Ref(C,-DN)+

((n-HN5)/HN)*Ref(C,-HN)+

((n-HN7)/HN)*Ref(C,-HN3)+

((n-(HN7+HN))/HN)*Ref(C,-HN4)+

((n-(HN7+HN4))/HN)*Ref(C,-HN5)+

((n-(HN7+HN6))/HN)*Ref(C,-HN6)+

((n-(HN5*HN3))/HN)*Ref(C,-HN7)+

((n-(HN5*HN3+HN)/HN)*Ref(C,-HN*HN4)+

((n-(HN5*HN3+HN4))/HN)*Ref(C,-HN3*HN3)+

((n-(HN5*HN4+DN))/HN)*Ref(C,-HN*HN5)+

((n-(HN5*HN4+HN3))/HN)*Ref(C,-HN*HN5+DN)+

((n-(HN5*HN5))/HN)*Ref(C,-HN3*HN4)+

((n-(HN5*HN5+HN))/HN)*Ref(C,-HN3*HN4+DN)+

((n-29)/HN)*Ref(C,-HN3*HN4+HN)+

((n-31)/HN)*Ref(C,-HN3*HN5)+

((n-33)/HN)*Ref(C,-HN3*HN5+DN)+

((n-35)/HN)*Ref(C,-HN3*HN5+HN)+

((n-37)/HN)*Ref(C,-HN3*HN6)+

((n-39)/HN)*Ref(C,-HN3*HN6+DN)+

((n-41)/HN)*Ref(C,-HN4*HN5)+

((n-43)/HN)*Ref(C,-HN4*HN5+DN)+

((n-45)/HN)*Ref(C,-HN4*HN5+HN)+

((n-47)/HN)*Ref(C,-HN4*HN5+HN3)+

((n-49)/HN)*Ref(C,-HN4*HN6)+

((n-51)/HN)*Ref(C,-HN5*HN5)+

((n-53)/HN)*Ref(C,-HN5*HN5+DN)+

((n-55)/HN)*Ref(C,-HN5*HN5+HN)+

((n-57)/HN)*Ref(C,-HN4*HN7)+

((n-59)/HN)*Ref(C,-HN4*HN7+DN)+

((n-61)/HN)*Ref(C,-HN6*HN5)+

((n-63)/HN)*Ref(C,-HN6*HN5+DN)+

((n-65)/HN)*Ref(C,-HN6*HN5+HN)+

((n-67)/HN)*Ref(C,-HN6*HN5+HN3)+

((n-69)/HN)*Ref(C,-HN6*HN5+HN4)+

((n-71)/HN)*Ref(C,-HN5*HN7)+

((n-73)/HN)*Ref(C,-HN6*HN6)+

((n-75)/HN)*Ref(C,-HN6*HN6+DN)+

((n-77)/HN)*Ref(C,-HN6*HN6+HN)+

((n-79)/HN)*Ref(C,-HN6*HN6+HN3)+

((n-81)/HN)*Ref(C,-HN6*HN6+HN4)+

((n-83)/HN)*Ref(C,-HN6*HN6+HN5)+

((n-85)/HN)*Ref(C,-HN7*HN6)+

((n-87)/HN)*Ref(C,-HN7*HN6+DN)+

((n-89)/HN)*Ref(C,-HN7*HN6+HN)+

((n-91)/HN)*Ref(C,-HN7*HN6+HN3)+

((n-93)/HN)*Ref(C,-HN7*HN6+HN4)+

((n-95)/HN)*Ref(C,-HN7*HN6+HN5)+

((n-97)/HN)*Ref(C,-HN7*HN6+HN6)+

((n-99)/HN)*Ref(C,-HN7*HN7));

TN:=Mov(C,n,S);

yTwo:=TN+(HN6*sOne)/((n+DN)*n);

yTwo

 

Coppock Curve - LT Momentum

As you can see from the older mails below, there are quite a few CC indicators around. The Curves: Indicators, Momentums, Oscillators and SysTests.

The one I am using is a 3-week tradeable version:

Name: Coppock Curve - LT Momentum

Formula:

1). Calculate the % change in value from 14 months ago.

2). Calculate the % change in value from 11 months ago.

3). Add 1 + 2. 4). The Coppock indicator is the 10-month (220days) weighted average of 3.

4). Original Modified to a 3-week version for trading purposes.

5). Overlay for trigger with a 14-day SMA, AJM.}

Mov((CLOSE-Ref(C,-300))/(Ref(C,-300)*0.01)+

(CLOSE-Ref(C,-240))/(Ref(C,-240)*0.01),15,W)

Regards,

Ton Maas

 

WOODS CULUMATIVE VOLUME FLOAT INDICATOR

BackVolume:=LastValue(Cum(V))-Cum(V)+V;

float:=Input("# Shares (millions) ",1,100,1);

float=float*1000000;

if(BackVolume>=float,+1,-1);

leo.timmermans.lt@belgium.agfa.com

Here's how the WCVFI works:

The float is a variable input value that must be entered for each different stock under consideration. Starting on any given day and working backward, the current day's volume is added to the previous day's volume and adds that to the next previous day's volume and so on. As each volume number from the past is added cumulatively, the computer compares the running total with that particular stock's float. When the cumulative total is equal to or greater than the float, a dot is placed above that particular bar on the chart.

Then two horizontal lines are plotted on the chart. The top line shows the highest price reached during the backward count, and the bottom line, the lowest price. These lines serve as trigger lines for the buy and sell signals. When the stock's price goes through the top line it gives a buy signal, and when it goes through the bottom line it gives a sell signal. The lines extend backward from the starting date to the bar, where the float has gone through one complete turnover.

Some stocks with a small float may take months or years to go through one complete turnover, while other stocks with large floats may have a rapid turnover in a matter of days.

The program is set up to start counting backward from any date entered for historical studies or set for the present date form constant updates. If a stock's price is rising day after day, the program gives buy signals each time the price goes through the line set from the previous day's highest price reached. Looking at stocks reveals four patterns that occur often.

See http://www.floatanalysis.com/mag.htm   for full article and graph examples.

from Steve Denk