Hello,
Now that SciChart ver 5.0 has been released with support for the DiscontinuousDateTime axis type, I am evaluating it for use in financial charting. I see the NYSECalendar example on how to create a custom calendar but don’t immediately see how I would use the API to handle trading hours for futures contracts. For example, soybeans at the Chicago Mercantile Exchange open for trading Sunday night at 7 PM. They trade until the next morning until 7:45 AM at which point there is a pause and then trading resumes at 8:30 AM and continues until 1:20 PM (yes, I know a bit convoluted). So I want to skip Saturday, but only part of Sunday, and part of Friday after trading is done for the week. How would I achieve this with the DiscontinousDateTimeCalendar? Thank you.
Regards,
Lawson
- Lawson McWhorter asked 6 years ago
- You must login to post comments
Hi Lawson,
I just looked at the API for the DiscontinuousDateTimeAxisCalender and while it allows skipping specific days of week (e.g. Saturday, Sunday), or time-ranges (e.g. repeating time ranges outside of 09:30 – 16:00) or even special days (Christmas day, New years day), it doesn’t allow you to skip a time-range on just one day (Sunday, or Monday).
(For reference to other viewers, Im including the NyseCalendar Below)
/// <summary>
/// Example of how to make a Discontinuous DateTime Calender for the New York Stock Exchange
///
/// If you wish to extend this, ensure that public holidays are set for the year(s) which you wish to show data
/// e.g. https://www.redcort.com/us-federal-bank-holidays/
/// </summary>
public class NYSECalendar : DiscontinuousDateTimeCalendarBase
{
public NYSECalendar()
{
// For intraday data, you can add a skip range like this.
// For daily data, skip ranges will cause the Daily OHLC bars with timestamp at 0:00:00 to be skipped
SkipDayTimeRange.Add(new TimeSpanRange(new TimeSpan(0, 0, 0), new TimeSpan(9, 30, 0))); // NYSE is open at 9:30 am EST
SkipDayTimeRange.Add(new TimeSpanRange(new TimeSpan(16, 0, 0), new TimeSpan(24, 0, 0))); // NYSE is closed at 16:00 pm EST
// NYSE is closed on weekends
SkipDaysInWeek.Add(DayOfWeek.Saturday);
SkipDaysInWeek.Add(DayOfWeek.Sunday);
SkipDates.Add(new DateTime(2015, 12, 25)); // NYSE Closed on Christmas Day 2015
SkipDates.Add(new DateTime(2016, 1, 1)); // NYSE Closed on New years day 2016
SkipDates.Add(new DateTime(2016, 1, 15)); // NYSE Clsoed on Martin Luther King Day 2016
SkipDates.Add(new DateTime(2016, 11, 24)); // NYSE Closed on Thanksgiving 2016
}
}
What you may have to do is allow all of sunday to be viewable, as well as all of Monday. This will cause a gap on the chart, which is not ideal.
I can ask my team to look into whether we can extend the discontinuous calendar to allow SkipTimeRangeInDay -> e.g. a specific day with a time-range skip. If its possible, we will do it.
Thank you for your feedback,
Best regards,
Andrew
- Andrew Burnett-Thompson answered 6 years ago
-
Thank you Andrew. I didn’t want to complicate matters in the original question but one other wrinkle is that normal trading hours have changed through time. So to really properly support historical financial charting the API should probably accept start and end dates over which a skip range is valid. The timespan skip range should probably have a day of week associated with it as well. I’m happy to share an example of historical exchange hours if it would be helpful to you and your team. Regards, Lawson
-
Yeah it would be useful to have this info — can you send it to support [at] scichart [dot] com? I think that we can add a Day, Date or Date Range for the skip times. I’ll need to ask the team though.
-
Has this been considered for addition? I am plotting historical and real-time process data and being able to SkipTimeRangeInDay would be huge. I have been using CategoryDateTimeAxis but this handles uneven datasets poorly as it plots the data by index forcing me to insert a bunch of NaN data to ensure the indexes match up. For my purposes, being able to skip time ranges unique to each date would be ideal.
-
I’d be interested in this additional feature as well? Is there any progress done? If this won’t be added, is there a way one could implement this function by oneself?
- You must login to post comments
Nice information shared by you in this post. Thanks
- Jeffery Scott answered 3 years ago
- You must login to post comments
This is awesome and best.
https://bio-protocol.org/userhome.aspx?id=1420380
https://swaay.com/u/publiwebmaxter/about/
https://macuisineturque.fr/author/sherpax/
https://www.stickermule.com/eu/u/sherpax
https://cnxus.org/members/cienlatas/
https://boilingsteam.com/profile/barillax
https://autotest.com.ar/author/pedantex/
https://www.acto.org.uk/user-profile/don.peri/
https://www.vitalmtb.com/community/siropex/blog/03/13/2023/entry/97271
https://app.impactplus.com/users/carlo-pantojo
https://www.thebmc.co.uk/profile?id=59124
https://appsliced.co/u/publiwebmaxter
https://www.investagrams.com/profile/pedritocapo
https://pangian.com/user/lorenzorikelme/
https://www.dcfever.com/users/profile.php?id=1155621
https://veganfooduk.co.uk/profile/burinot/
https://www.mochub.com/user/55778
https://community.creatio.com/user/200861
https://gwar.net/a/bohabs/users/136655
https://www.evtv.me/author/troglod/
https://brain-market.com/u/pillastre
https://forum.peplink.com/u/zoraya
https://letsloop.com/bandidox
https://www.civocracy.org/user/42368
https://wikifactory.com/@publiwebmaxter
https://modworkshop.net/user/146696
https://sketchersunited.org/users/214158
https://afribary.com/authors/moha-taser
https://adultsearch.com/es/barcelona/sex-forum/general-talk/topic/28869
https://www.root-me.org/gatitas
https://community.goldposter.com/members/tocnaza/profile/
https://onlyfans.com/elojetex
https://microrrelatos.abogacia.es/comunidad/juan-69/profile/
https://motherless.com/m/maestrox
- juanka pajares answered 8 months ago
- last edited 7 months ago
- You must login to post comments
Please login first to submit.