Here's on Si compiled by http://www.moex.com/ru/contract.aspx?code=Si-12.17
Year/Quarter | 3 | 6 | 9 | 12 |
---|---|---|---|---|
2012 | 15.03.2012 | 15.06.2012 | 17.09.2012 | 17.12.2012 |
2013 | 15.03.2013 | 17.06.2013 | 16.09.2013 | 16.12.2013 |
2014 | 17.03.2014 | 16.06.2014 | 15.09.2014 | 15.12.2014 |
2015 | 16.03.2015 | 15.06.2015 | 15.09.2015 | 15.12.2015 |
2016 | 15.03.2016 | 15.06.2016 | 15.09.2016 | 15.12.2016 |
2017 | 16.03.2017 | 15.06.2017 | 21.09.2017 | 21.12.2017 |
What is the best way to exclude these dates?
- www.moex.com
Implemented this way
void OnTick() { //--Исключаем экспирацию по Si if(Symbol()=="Si Splice") { datetime Open_timeExp=iTime(_Symbol,0,0); MqlDateTime strExp; TimeToStruct(Open_timeExp,strExp); strExp.hour=0; strExp.min=0; strExp.sec=0; for(int i=0;i<23; i++) { if(StructToTime(strExp)==StringToTime(ExpSi(i))) { BuyNow=false; SellNow=false; break; } } } } ////// //+------------------------------------------------------------------+ //|Массив с датами экспирации опциона Si | //+------------------------------------------------------------------+ string ExpSi(int i) { string Exp[24]= { "15.03.2012 0:00", "15.03.2013 0:00", "17.03.2014 0:00", "16.03.2015 0:00", "15.03.2016 0:00", "16.03.2017 0:00", "15.06.2012 0:00", "17.06.2013 0:00", "16.06.2014 0:00", "15.06.2015 0:00", "15.06.2016 0:00", "15.06.2017 0:00", "17.09.2012 0:00", "16.09.2013 0:00", "15.09.2014 0:00", "15.09.2015 0:00", "15.09.2016 0:00", "21.09.2017 0:00", "17.12.2012 0:00", "16.12.2013 0:00", "15.12.2014 0:00", "15.12.2015 0:00", "15.12.2016 0:00", "21.12.2017 0:00" }; return (Exp[i] ); } //+------------------------------------------------------------------+
Is there a smarter way?
In order to test the EA, we need to get rid of the seams on the futures glues, particularly on Si.
How do I know the dates of the stitches to eliminate them?
The idea is the expiry day - but where is the list of all expiry days? Maybe there is a programmatic way to find this, so I do not need to gather information.
Why guess?
From the current date, you can get the name of the most liquid futures for the instrument and the next following one. And compare the bars of the glue and these two futures. That way you will understand where they make the transition and according to what algorithm.
Why guess?
From the current date, you can get the name of the most liquid futures on the instrument and the one following it. And compare the bars of the glue and these two futures. This way you will understand where they make the transition and according to what algorithm.
I do not understand your logic.
I'm not suggesting to guess - I collected the expiry dates on Si.
I don't understand your logic...
I am not suggesting guessing - I have collected the expiry dates on Si.
By the way, in the properties of the symbol is the last day of circulation. This can be accessed from the EA.
there is, but it is useless for ruling out glue splices
For example the current Si-9.17 is 21.09.2017
and it is better to exclude not only the 15th, but also the 16th, imho
Implemented this way
Maybe there is a more rational way?
I suppose you could just exclude the 14th to the 17th of the 3rd, 6th, 9th and 12th months
Where is the information that the gluing is on the last day? As far as I understand you think (or know) that up to a certain point in time the glue is composed of one futures and then another. What if it does not? Where does this information come from?
The stack consists of different futures. About the last day - an observation, including the chart shows it. But this is at Otkritie broker, others may be different.
By the way, there is a last day of circulation in the symbol properties. It can be accessed from the EA.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
In order to test the EA, we need to get rid of the seams on the futures glues, particularly on Si.
How do I know the dates of the stitches to eliminate them?
The idea is the expiry day - but where is the list of all expiry days? Maybe there is a way to find out the expiry date without having to collect information?