Gann Swing Show Bar

Optuma Forums Optuma Scripting Gann Swing Show Bar

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #63171
    • Topics: 22
    • Replies: 35
    • Posts: 57

    On the attached WorkSheet the Show Bar Scripts do not always work as intended.  I partly fixed the problem by using

    instead of

    The intendent of the Show Bar script is to identify a Higher Gann Swing High after a Higher Gann Swing Low.

    Help would be appreciated.

    Cheers, Lester

    • Topics: 20
    • Replies: 33
    • Posts: 53

    I don’t know for sure but maybe it is this line:
    c4 = c1 and c2 and c3
    I would have thought that it should be;
    c4=c1 and c4=c2 and c4=c3
    and then I would leave out the last line, “c4”
    It’s only a guess. I have not researched that coding grammar.


    • This reply was modified 1 month ago by AvatarMichael.
    • Topics: 22
    • Replies: 35
    • Posts: 57

    Hi Michael,
    Thank you for your contribution, however unfortunately it does not work.  It also gives a script error.

    I believe the statement line first assigns the value of c1 to c4 and then the value of c2 to c4 then the value of c3 to c4.  After this the script engine looks for c4 (since it has been assigned a value).  It then gives an error because there is none.

    Regards, Lester

    • Topics: 36
    • Replies: 1,817
    • Posts: 1,853

    Hi Lester,

    The issue here is mixing Bar Lists and Swing Lists.
    For more information, look at this post

    So you can introduce e2 which is the bar-by-bar swing end value. But note that every higher bar is going to trigger that. See Lines 5&6.

    Another way is to change the CrossesAbove to be the Swings. See Line 6

    In your workbook, where you say “Neither function worked here” that is because your other rules. I think your offsets are wrong. Have a look at this post for a tip on numbering swings.

    All the best


    • Topics: 22
    • Replies: 35
    • Posts: 57

    Hi Mathew,
    Thank you very much for your very detailed answer.  I hope there is nothing else in Optuma as tricky as Gann Swings!

    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