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

Problem with SwingHigh/SwingLow



PureBytes Links

Trading Reference Links

I've encountered a major problem with both SwingHigh and SwingLow functions
while testing a pivot identification program which intermittently returned
bad pivots.

Definitions per Omega Function Help:

"A Swing High occurs when the PRICE of a bar is higher than the PRICE on the
preceding bar(s), and at least as high as
the same PRICE on the bar(s) that follow it." (Example: 53 _54_ 54 55 _56_
55 - 2nd and 5th bars are SwingHigh strength 1)

"A Swing Low occurs when the PRICE of a bar is less than the same PRICE on
the preceding bar(s), and at least as low
as the same PRICE on the bar(s) that follow it." (Example: 54 _53_ 53 52
_51_ 52 - 2nd and 5th bars are SwingLow strength 1)

Note: I take issue with the inability to select SwingH/L which are true
pivots but that's not the issue here.

Excerpt from data series Nyse composite Dial Data symbol *NYE:

 12/01/71 52.729 52.729 52.729 52.729 21040
 12/02/71 52.889 52.889 52.889 52.889 17780
 12/03/71 53.509 53.509 53.509 53.509 16760
 12/06/71 53.250 53.250 53.250 53.250 17480
 12/07/71 53.490 53.490 53.490 53.490 15250
 12/08/71 53.550 53.550 53.550 53.550 16650
 12/09/71 53.550 53.550 53.550 53.550 14710
 12/10/71 53.990 53.990 53.990 53.990 17510
 12/13/71 54.190 54.190 54.190 54.190 17020
 12/14/71 53.990 53.990 53.990 53.990 16070
 12/15/71 54.429 54.429 54.429 54.429 16890

ShowMe's built to demonstrate bug by identifing SL/SH in previous bar:

If SwingLow(1,Low,1,2) > -1 then place mark on Low[SwingLowBar(1,Low,1,2)]
(note this places mark 1 bar beyond the SwingLow i.e. current bar at same
price as the SwingLow).

If SwingHigh(1,High,1,2) > -1 then place mark on
High[SwingHighBar(1,High,1,2)] (note this places mark 1 bar beyond the
SwingHigh i.e. current bar at same price as the SwingHigh).

Results returned by ShowMe:

SwingLows: 12/6, 12/9, 12/14
SwingHighs: 12/3, 12/13

Errors:

1) SwingLow on 12/9 does not fit definition but is marked.
2) Bar on 12/8 fits definition of a SwingHigh but is not marked.

I'm running the latest build of SC4. Don't know if problem has been
found/fixed in TS but any program built with the TS PE will encounter this
problem when run on SC4.

Have I missed something obvious, is this a known bug, or am I the first to
discover it? If it is a known bug, any ideas on why it hasn't been fixed?

Earl Adamy