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

Re: Looking for Trough Divergences



PureBytes Links

Trading Reference Links

i will come to your rescue - don't waste your [ time ]. hidden meaning in there.



----- Original Message ----- From: "Thomas J. Festa" <festat@xxxxxxxxxxxxx>
To: <omega-list@xxxxxxxxxx>
Sent: Saturday, July 28, 2007 2:58 PM
Subject: Looking for Trough Divergences


I've been trying to work on this function rewrite in TS2000i.  It
verifies but I don't think it's working, think there is obviously
something wrong with the logic.  I posted the original function to the
list and have been working on this rewrite so to make it easier to
understand.

Please help somebody.

Thanks,
==========================================================

{ TroughDivergence Function - created by Thomas J, Festa, CMT Copyright
c 2007 }

Inputs: SwingStrength(NumericSimple), SwingLgth(NumericSimple),
OSC(NumericSeries);

Vars:  OscPrice(0), HighestOsc(0), IndicatorPrice(0), LowestOsc(0),
PivotLow(0), LowPrice(0), HighestLow(0), LowestLow(0);

Value1 = SwingLow(1, Low, SwingStrength, SwingLgth);

If Value1 <> -1 then begin
LowPrice = PivotLow;
PivotLow = Value1;

IndicatorPrice = OscPrice;
OscPrice = OSC[SwingStrength];

HighestLow = Value2;
LowestLow = Value3;
Value2 = Highest(Low, SwingLgth);
Value3 = Lowest(Low, SwingLgth);

HighestOsc = Value4;
LowestOsc = Value5;
Value4 = Highest(OSC, SwingLgth);
Value5 = Lowest(OSC, SwingLgth);
end;

If Low > Value2 then
Value2 = Low;

If Low < Value3 then
Value3 = Low;

If OSC > Value4 then
Value4 = OSC;

If OSC < Value5 then
Value5 = OSC;

If (HighestLow - LowestLow) = 0 or
(HighestOsc - LowestOsc) = 0 then
TroughDivergence = TroughDivergence[1]
else
TroughDivergence = 50*(( (OscPrice - IndicatorPrice) /
(HighestOsc - LowestOsc) ) -
( (PivotLow - LowPrice) / (HighestLow - LowestLow)) );

--
Thomas J. Festa, CMT
Technical Analysis Trading Systems Developer
Senior Proprietary Trader
Hold Brothers, LLC
230 Headquarters Plaza
East Tower, 2nd Floor
Morristown, NJ  07960
Cell:   (908) 581-8880

Confidentiality Notice: The information contained in this e-mail and any
attachments may be legally privileged and confidential. If you are not
an intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this e-mail is strictly prohibited. If you
have received this e-mail in error, please notify the sender and
permanently delete the e-mail and any attachments immediately. You
should not retain, copy or use this e-mail or any attachment for any
purpose, nor disclose all or any part of the contents to any other
person.