PureBytes Links
Trading Reference Links
|
> -----Original Message-----
> From: Ian Waugh [mailto:ianwaugh@xxxxxxxxx]
> I'm trying to define a swing point, let's say a high, but it's not like
> a "standard" high that has a lower high on either side, I'd like to
> define a Swing high like this:
>
> A bar makes a higher high. The next bar can have the same high or a
> lower high but not, of course, a higher high. Then take the lowest low
> of these two bars. Now, in order to actually qualify that first bar as a
> swing high, we need a bar that *closes* lower than either of the first
> two bars.
>
> The minimum number of bars required to define a high is, therefore,
> three. However, theoretically, there's no limit to the maximum number of
> bars although in practise it's never reached the limit (:-).
>
> Having defined a swing high, we then look for a swing low which is
> defined in exactly the same way but, er, the other way around. You
> cannot have two SHs or two SLs in a row, the order must be SH, SL, SH,
> SL, etc.
I did something like this recently for a client. My solution to this
was (for Pivot High, same thing for Pivot Low):
1. When you've found the Pivot High Candidate:
a. set a flag, bPHSetup, to true.
b. Set a counter, iPHSetupLag to 0.
c. Save lowest low of the two bars into iPHLowest.
2. Increment iPHSetupLag. If iPHSetupLag > <some value> then reset
bPHSetup to false. This sets a limit on number of bars you'll seek
to confirm a candidate.
3. If bPHSetup and C < iPHLowest then you've confirmed the Pivot.
I think that will do it for you.
Cheers,
Brendan
---
Brendan B. Boerner
brendan@xxxxxxxxxxxxxx
Karakhorum Ventures, Inc.
www.Karakhorum.com
|