Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Option Expiration Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
thnkbigr
Posted : Wednesday, October 21, 2009 6:35:49 PM
Platinum Customer Platinum Customer

Joined: 3/31/2006
Posts: 3,207

Bruce,

Can we write a code that recognizes the option expiration days? Friday before the 3rd Sat of every month.

thx

Bruce_L
Posted : Thursday, October 22, 2009 9:07:14 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I don't know anything about options, but assuming you are correct and that the Option Expiration is always the Friday before the 3rd Saturday of every month, then it would seem to me that any Friday that is also the 14th, 15th, 16th, 17th, 18th, 19th or 20th of month would be an Option Expiration date. If so, the following RealCode Rule should work (although Market Holidays might mess with these assumptions):

If 14 <= Price.DateValue.Day AndAlso _
    Price.DateValue.Day <= 20 AndAlso _
    Price.DateValue.DayOfWeek = 5 Then Pass

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thnkbigr
Posted : Thursday, October 22, 2009 12:45:28 PM
Platinum Customer Platinum Customer

Joined: 3/31/2006
Posts: 3,207
Bruce

My bad its the 3rd friday of every month it has nothing do with Sat in this case. 

How can I just change this to the 3rd friday? 
Bruce_L
Posted : Thursday, October 22, 2009 12:47:46 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I would think that would just change the day of the month range from 14-20 to 15-21:

If 15 <= Price.DateValue.Day AndAlso _
    Price.DateValue.Day <= 21 AndAlso _
    Price.DateValue.DayOfWeek = 5 Then Pass

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thnkbigr
Posted : Thursday, October 22, 2009 12:58:56 PM
Platinum Customer Platinum Customer

Joined: 3/31/2006
Posts: 3,207
thx looks accurate
Bruce_L
Posted : Thursday, October 22, 2009 1:02:55 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Mark17
Posted : Monday, October 26, 2009 10:42:14 AM
Registered User
Joined: 7/1/2009
Posts: 97
Market holidays may affect the last day of trading before expiration.
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.