Swingstat filter

Optuma Forums Optuma Scripting Swingstat filter

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by Avatar Jody 2 months, 1 week ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #53991
    Avatar
    Jody
    • Topics: 1
    • Replies: 2
    • Posts: 3

    Having done the scripting course, I can find no way of applying the ‘filter stats boxes’ when scripting the swingstat function.

    Does anyone know if this is actually possible?

    #53993
    Darren
    Darren
    • Topics: 41
    • Replies: 280
    • Posts: 321

    Hi Jody,

    What’s your objective? Did you see this video on the SwingStat function?

    https://learn.optuma.com/course/advanced-scripting/?course_type=content&course_page=1&lecture=11

    #53995
    Avatar
    Jody
    • Topics: 1
    • Replies: 2
    • Posts: 3

    Hi Darren,

    That is the video I’ve seen.

    Using the Barros swings in the swingstat function, I’m looking to filter out the outliers with a standard deviation outside mean 2, in a similar way it’s  done with the manual stats box tool. Is this possible?

    #53997
    Darren
    Darren
    • Topics: 41
    • Replies: 280
    • Posts: 321

    You should be able to, something like this to calculate the Std Dev SwingStat for the last 5 up swings:

    BS1=BARROSSWING();

    SWINGSTAT(BS1, DEFAULT=StdDevSwing, SWINGS=5, TYPE=Up)>2

     

    #54007
    Avatar
    Jody
    • Topics: 1
    • Replies: 2
    • Posts: 3

    I’m new to the forum, so please excuse my apparent vagueness.

    This is the code I currently have which expresses the current swing as a percentage of the mean impulse swing:

    BS1 = barrosswing(DEFAULT=Mid);

    SWR1 = abs(swingstart(bs1) – swingend(bs1));

    #$SW = 30;

    SWM2 = swingstat(BS1, SWINGS=$SW, TYPE=Impulse, DEFAULT=AvgSwing);

    SWSTD1 = swingstat(BS1, SWINGS=$SW, TYPE=Impulse, DEFAULT=StdDevSwing);

    SWR1 / SWM2

    Within the sample of 30 I would like to be able to remove any which are greater than 2 std dev from mean.

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