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

In need of some direction.



PureBytes Links

Trading Reference Links

I'm trying to create a Show Me that would mark the +/- time period for
the next occurrence of a cycle.  I've had little success figuring it out
from the Omega Easy Language materials or by dissecting existing
indicators/functions/paintbars routines.

I'm hoping that someone would confirm I'm on the right track or suggest
a better solution.

The Swing High/Low Bar function will return the number of bars ago for
the last occurrence of a user defined cycle top/bottom.

I would like to retrieve this figure for "x" number of occurrences of
the Swing High/Low .

This result can be used to determine the duration of "x" number of
cycles as defined by this function.

>From this range, say five occurrences, and average duration would be
calculated with a +/- factor.

Let's say it turns out to be 55 +/- 8.

I would then like Show Me to start plotting when the current bar is 46
bars after the recent occurrence of the Swing Low/High and continue for
the next 16 bars.

The routine should be able to calculate/plot either swing high or swing
low zone.

For flexibility in developing, it would be nice if the determination of
the average duration formula could be set to consider prior SwingHigh
and SwingLow durations if desired.

I do this routine manually on tick data throughout the day with the
Cycle and Rectangle drawing tools and figured automating it would be a
good way to start plumbing the depths of (not so) Easy Language.

The SLBar function can be set to return a value for different
occurrences, i.e 1 = most recent, 2 = 2nd most recent, etc. , I don't
have any clues as to getting it return values for the 5 most recent.
I've looked into loops and got lost.  And I'm assuming the results go
into an array for averaging, and that output becomes an input for the
ShowMe.  And I've yet to figure out how to get the ShowMe to recognize
the current occurrence of a SwingHigh/Low and start counting.

Any suggestions would be appreciated.

Thanks,

Glenn Suprenard