...the output of this formula series spikes away from the zero line. It almost never fails. The formula assigns divergence points to each of 200 moving averages... either a positive 1 point, a negative 1 point or a zero to each of 200 moving averages.
A positive point gets assigned when today's close divided by X moving average, is greater than yesterday's close divided by X moving average, AND the close is less than yesterday's close (in other words, a positive divergence). For a negative point for the same moving average time, the opposite must be true. And if neither is true, zero is assigned. It looks like this:
if( close/mov(close,1) > delay(close/mov(close,1),1) && close<delay(close,1), 1,0)
+
if( close/mov(close,1) < delay(close/mov(close,1),1) && close>delay(close,1), -1,0)
+
if( close/mov(close,2) > delay(close/mov(close,2),1) && close<delay(close,1), 1,0)
+
if( close/mov(close,2) < delay(close/mov(close,2),1) && close>delay(close,1), -1,0)
+
if( close/mov(close,3) > delay(close/mov(close,3),1) && close<delay(close,1), 1,0)
+
if( close/mov(close,3) < delay(close/mov(close,3),1) && close>delay(close,1), -1,0)
+
… (continue series to 200) …
+
if( close/mov(close,200) > delay(close/mov(close,1),1) && close<delay(close,1), 1,0)
+
if( close/mov(close,200) < delay(close/mov(close,1),1) && close>delay(close,1), -1,0)
And today's chart output? It looks like this, of course:
A spike down (virtually 200 negative moving average divergences today), and of course a doji day. Negative divergence climaxes almost always happen during bullish phases (like now). The reverse is true for bearish phases.
Just some funny stuff from my 'puter.
You know it's going to be a doji day when...
Started by
spielchekr
, Aug 26 2009 07:23 PM
2 replies to this topic
#1
Posted 26 August 2009 - 07:23 PM
#2
Posted 27 August 2009 - 05:49 AM
Great post, thanks for the formula data. I need something to keep me awake during this grind up till we get some sort of consolidation.
Best to you,
mss
WOMEN & CATS WILL DO AS THEY PLEASE, AND MEN & DOGS SHOULD GET USED TO THE IDEA.
A DOG ALWAYS OFFERS UNCONDITIONAL LOVE. CATS HAVE TO THINK ABOUT IT!!
A DOG ALWAYS OFFERS UNCONDITIONAL LOVE. CATS HAVE TO THINK ABOUT IT!!
#3
Posted 29 August 2009 - 08:15 PM
For those that use this miserable TS easy language:
inputs:
Price( Close );
variables:
x(0),
val(0);
Array: smaA0[200](1),smaA1[200](1);
val = 0;
For x= 1 to 200 begin
smaA0[x] = Average( Price, x );
if ((close/smaA0[x]) > (close[1]/smaA1[x])) and (close < close[1]) then
val = val+1 else
if ((close/smaA0[x]) < (close[1]/smaA1[x])) and (close > close[1]) then
val = val-1;
smaA1[x] = smaA0[x];
end;
Plot1( val, "sumofsmadiv" ) ;