Inside Gann Swing

Optuma Forums Optuma Scripting Inside Gann Swing

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #52191
    Srikanth
    • Topics: 5
    • Replies: 5
    • Posts: 10

    I am trying to write script for inside gann swing but its not working .
    below is my script and attaching sample example some one please help me on fixing this.

    // get the swingsg1 = GANNSWING(SWINGCOUNT=2, METHOD=Use Next Bar, USEINSIDE=False, USEBREAKOUT=False);// get the ends of the swingse1 = SWINGEND(g1(0));e2 = SWINGEND(g1(1));e3 = SWINGEND(g1(2));e4 = SWINGEND(g1(3));//get the swing startL1 = SWINGSTART(g1(0));L2 = SWINGSTART(g1(1));L3 = SWINGSTART(g1(2));L4 = SWINGSTART(g1(3));//  show signalb1  =  ((e3 > e2)  and (e2 > e1 ) and (L3 < L2)  and (L2 < L1)); b1

    • This topic was modified 2 years ago by Darren.
    #52215
    Tim
    • Topics: 11
    • Replies: 19
    • Posts: 30

    see the below formulae, at the top is the parameters of what type of swing etc.  Create a new indicator out of it, apply it in new tool.  This one is the formulae for long trades only.

     

    GS1 = GANNSWING(SWINGCOUNT=2, USEINSIDE=True, METHOD=Use Next Bar, USECLUSTERS=False);

    c1 = SWINGUP(GS1);

    c2 = SWINGSTART(GS1) < SWINGSTART(GS1, 1);

    c3 = SWINGSTART(GS1, 1) < SWINGSTART(GS1, 3);

    c4 = SWINGSTART(GS1) > SWINGSTART(GS1, 2);

    c5 = SWINGSTART(GS1, 2) > SWINGSTART(GS1, 4);

    s1 = SWINGEND(GS1[1]);

    U1 = SWINGUP(GS1);

    V1 = IF(S1 < SWINGEND(GS1[2]),SWINGEND(GS1[2]),S1);

    c7 = high() CrossesAbove V1 and U1 == 1;

    c1 and c2 and c3 and c4 and c5 and c6

    #52219
    Srikanth
    • Topics: 5
    • Replies: 5
    • Posts: 10

    Thanks Tim,

    I tried creating custom tool and show bar options both are not working.

    its not showing any script error but its not plotting any signals . I did ran scan for 5 years data not even one signal on it.

    may be am I missing something?

    #52227
    Tim
    • Topics: 11
    • Replies: 19
    • Posts: 30

    My apologies I altered a couple of things and forgot to fully fix up, see below, naturally you can alter the GS1 swing parameters to suit.  It shows the completed triangle, but there are as always some anomolies.  There are different scripts if your looking for triangles forming but not yet confirmed, I have pasted also below a script that finds patterns where the swing turns up to create the possible triangle but may not yet have closed above the swing top to confirm a triangle,  It would be more a script to use in scanning looking for potential triangle candidates

     

    GS1 = GANNSWING(SWINGCOUNT=2, USEINSIDE=True, METHOD=Use Next Bar, USECLUSTERS=False);

    c1 = SWINGUP(GS1);

    c2 = SWINGSTART(GS1) < SWINGSTART(GS1, 1);

    c3 = SWINGSTART(GS1, 1) < SWINGSTART(GS1, 3);

    c4 = SWINGSTART(GS1) > SWINGSTART(GS1, 2);

    c5 = SWINGSTART(GS1, 2) > SWINGSTART(GS1, 4);

    s1 = SWINGEND(GS1[1]);

    U1 = SWINGUP(GS1);

    V1 = IF(S1 < SWINGEND(GS1[2]),SWINGEND(GS1[2]),S1);

    c6 = high() CrossesAbove V1 and U1 == 1;

    c1 and c2 and c3 and c4 and c5 and c6

     

     

    //Gann swing triangle canditates//

    GS1 = GANNSWING();

    SWINGUP(GS1) and (SWINGSTART(GS1) > SWINGSTART(GS1, 2))

    and (SWINGSTART(GS1, 2) > SWINGSTART(GS1, 4))

    and (SWINGSTART(GS1, 1) < SWINGSTART(GS1, 3))

    #52255
    Srikanth
    • Topics: 5
    • Replies: 5
    • Posts: 10

    thanks Tim its working.. 

    #52263
    Jonathan
    • Topics: 39
    • Replies: 59
    • Posts: 98

    Do you mind sharing a video or screen shot on how we can apply this to our charts… pleease 🙂

    #52267
    Srikanth
    • Topics: 5
    • Replies: 5
    • Posts: 10

    I am not expert trader I am still learning.

    you can see in attached screen shot, if price cross  signal bar it is buy for me based on that I will place the order.

     

    #52283
    Jonathan
    • Topics: 39
    • Replies: 59
    • Posts: 98

    This sounds very similar to the olivers wedge pattern already built into optuma through purchase.

    How does this differ?

    #52327
    Srikanth
    • Topics: 5
    • Replies: 5
    • Posts: 10

    I am not sure and if it is already available then it is good to know and I am sure it may have more functionality’s.

     

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

Pin It on Pinterest