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

Re: Why Won't This Work?



PureBytes Links

Trading Reference Links

WE are getting Close!   This may turn into a great indicator.

Mark and Bob, I took a composite of your suggestions and got it working
reasonably well, but added a little more features and now get a flat line. I
dicked around with it a coupla hours and can't quite pull it out.

Here's what it should do:

When working,  this indicator should tell us when something is making higher
highs AND higher lows (+1).....OR lower lows AND lower highs. (-1)

In addition, it will reverse instantly from +1 to -1 if the price (or
average) breaks a previous  low pivot, etc.

Also, it will tell us if we are in a contracting triangle (trendless) with
lower highs and higher lows.  (0)    This indicator could be a great basic
input for any system or neural.

Anyway, guys,  please give me a hand getting the bugs out and I'll bet many
on this list will find it useful too.  I will modify it further once
working, add a few more bells and whistles and post the final version for
all.

Thanks.

Tom Cathey

As follows :
---------------------------------

Var: MA(Close), Trend(0),Strength(0);

Strength=5;

MA = Average(Close, 20);

Value1 = SwingLow(1, MA, Strength, Strength+1);        {Find SwingLow}
Value3=SwingHigh(1, MA, Strength, Strength+1);         {Find SwingHigh}


If Value1 > 0 and value3 > 0  then
Begin

If Value1> Value2 and Value3>Value4 then Trend=1;    {Established Uptrend,
higher lows and higher highs }
If  Trend =1 and MA<Value1 then Trend= -1;                    {If SwingLow
gets broken, then immediate -1}

If Value1> Value2 and Value3 < Value4  then Trend=0;   {Triangle -Trendless}


If Value1< Value2 and Value3<Value4 then Trend= -1;   {Established
DownTrend, lower lows and lower highs}
If  Trend = -1 and MA>Value3 then Trend=1;                       {If
SwingHigh Gets Broken then immediate +1}


Value2 = Value1;  {save previous SwingLow}
Value4=Value3;    {save previous SwingHigh}

End;


Plot1(Trend, "Trend");