Offset Value from Bartype() Search?

Optuma Forums Optuma Scripting Offset Value from Bartype() Search?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #58915
    AvatarLester
    • Topics: 19
    • Replies: 29
    • Posts: 48

    Hi,
    I am looking at an alternate way to identify Swing highs and Swing lows (pivot points), using the Bartype() function.
    Using the Bartype() function it may be possible to count the Offset from the most recent bar. I.e. if there are a series of Higher bars it could find the point where the Swing up started by identifying the last prior Down bar (or Outside bar). If it was possible to use that Offset value as a variable then it may be possible to start another back search looking for a Swing high by finding the next Up bar back, and so on. The include diagram may help explain.
    All this would require the ability to create variables for the Offset amounts and then use them in the Bartype() search function.

    Is this possible?

    Cheers, Lester

    Attachments:
    #58929
    MathewMathew
    • Topics: 32
    • Replies: 1,590
    • Posts: 1,622

    Hi Lester.

    I think what you are looking for can be done with the Gann Swing Overlay (uses higher and lower bars). You can have a ShowBar show you when the Swing Start changes value. Note: can’t use swing end as that is adjusted for every bar that is higher or lower/ The swing start only changes when a new swing is created).

    You can also use the Pivot function. It’s not looking at BarType but It gets you the same result.

    Hope that helps

    Mathew

    #58933
    AvatarLester
    • Topics: 19
    • Replies: 29
    • Posts: 48

    Hi Mathew,
    Thank you for your reply. I am trying to think of different approach to the question I posed under the earlier post title of “Dow Swing”. I have copied and pasted the original question under this post.
    The Gann Swing Overlay (GSO) is great for Gann Swings, however it cannot be used to make a Dow Swing because of the way it considers an Outside bar in the middle of a swing. Dow swing requires it to ignore the Outside bar unless it forms either the start or end of the swing.
    The only control in the current GSO is to set it to immediately consider the Outside bar or wait until the next bar to form.
    I believe the Pivot Function needs to be given a set percentage to decide on swing turns, rather than counting the secession of up or down bars. So, there may be occasions that miss a true Dow Swing.
    Thankfully the problem has mostly been solved by Charles (Chip) on page 2 of my prior post “Dow Swing”. I was just trying a different path, plus looking at the possibility of scripting by using the “Offset” function to set up precise relations to different parts of the formula.
    Regards, Lester
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    I am looking for a script for Dow Swing. Dow Swing is a technique taught by Dale Gillham of Wealth Within.
    It is similar to Gann Swing. However in a Gann Swing; outside bars are always considered. In Dow Swing they are treated as part of the trend unless they happen to form the peak or trough?
    The GANNSWING() function always includes consideration of Outside bars, even if it is not listed in the parenthesis. There is no DOWSWING function!

    #58941
    MathewMathew
    • Topics: 32
    • Replies: 1,590
    • Posts: 1,622

    Hi Lester,

    With the Pivot function, that is based on bar counts (there are no percentage calculations involved). Other than that, I’m not sure that there is much more available in scripting.

    All the best

    Mathew

    #58965
    AvatarLester
    • Topics: 19
    • Replies: 29
    • Posts: 48

    Hi Mathew,

    Thank you for your help.  I shall investigate Pivots further.

    Regards, Lester

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close