Select Page

Swingstat filter

Optuma Forums Optuma Scripting Swingstat filter

Tagged:

Viewing 5 posts - 1 through 5 (of 5 total)
• Author
Posts
• #53991
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
• Topics: 53
• Replies: 398
• Posts: 451

Hi Jody,

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

#53995
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
• Topics: 53
• Replies: 398
• Posts: 451

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
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.