Expiration Date of Contract Symbols

Questions about MultiCharts and user contributed studies.
mefTrader
Posts: 141
Joined: 23 Jun 2011
Has thanked: 9 times
Been thanked: 7 times

Expiration Date of Contract Symbols

Postby mefTrader » 06 Jul 2012

Code: Select all

if (LastBarOnChart) then Print(" Expires By : "+FormatDate("ddd_dd_MMM_yyyy", ElDateToDateTime(expirationdate)) );
I am getting the following output for Soybeans - +SN12 and +SQ12 respectively
Expires By : Fri_01_Jan_2038
Expires By : Fri_01_Jan_2038
Does the keyword "expirationdate" work?

mefTrader
Posts: 141
Joined: 23 Jun 2011
Has thanked: 9 times
Been thanked: 7 times

Re: Expiration Date of Contract Symbols

Postby mefTrader » 06 Jul 2012

By "work" I mean does it get the proper info from the symbol provider in my case IQFeed?

I am using MC Version 7.4 (Build 4953)

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Expiration Date of Contract Symbols

Postby JoshM » 06 Jul 2012

ExpirationDate works - it returns your QuoteManager expiration date. However, if that's wrong, then ExpirationDate also gives a "wrong" value.

mefTrader
Posts: 141
Joined: 23 Jun 2011
Has thanked: 9 times
Been thanked: 7 times

Re: Expiration Date of Contract Symbols

Postby mefTrader » 06 Jul 2012

I thought this would be picked up by the Data Feed Provider?

This is just as bad as the Description field for Conitiuous Futures instruments not being kept uptodate but reflecting whern the symbol was added to the database rather than which contract month it is on

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Expiration Date of Contract Symbols

Postby Henry MultiСharts » 12 Jul 2012

Expires By : Fri_01_Jan_2038
Expires By : Fri_01_Jan_2038
In order to have correct expiration date for IQFeed instrument - symbol root should be present in QuoteManager->Tools->Symbol Dictionary->IQfeed (applied for non-continuous contracts only).

mefTrader
Posts: 141
Joined: 23 Jun 2011
Has thanked: 9 times
Been thanked: 7 times

Re: Expiration Date of Contract Symbols

Postby mefTrader » 12 Jul 2012

I get this for individual contracts e.g

BOu12 (Sept 12) too

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Expiration Date of Contract Symbols

Postby Henry MultiСharts » 13 Jul 2012

I get this for individual contracts e.g

BOu12 (Sept 12) too
The instrument should be added from data source:
In Quote Manager please go to Instrument tab->Add symbol->From data source-> IQFeed.
Attachments
BOU12.png
(49.41 KiB) Downloaded 600 times


Return to “MultiCharts”