Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Holiday Schedules - Update/Merge Plan

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NinjaTrader_DaveI
    replied
    We are still tracking this one to see if more feedback or requests come in.

    Leave a comment:


  • RichManInTraining
    replied
    Any progress on creating an IsHoliday() and IsPartialHoliday() function in NT8?

    Leave a comment:


  • -=Edge=-
    replied
    Originally posted by ganamide View Post
    Thanks Edge! Are you porting your Draw Bar tool to NT8? Will it be a free upgrade for people who bought your NT7 version? Looking forward to all the improvements we can make with NT8.
    Absolutely.. not sure I would want to trade without it anymore.. That ones going to be a rather large undertaking though.. as of my 29th upgrade for that one, there is now over a couple thousand lines of code just in the toolstrips and events alone, and then even more so in the plot override.. All of which is going to have to be completely re-written, well maybe not completely, but it's definitely going to take a considerable amount of time and effort.. So doubtful that will be free..

    I've played a bit in VS with the conversion process, although haven't even started towards that one under NT yet.. There is still no viable or at least acceptable way imo of adding a dock/stack/wrap panel into NT yet.. Not real happy with wpf buttons and context menu's either, as they are adding several restraints to the way winforms did things.. I'll have to find some work around solutions for several things when it comes to that.. Although have a lot of new idea's and features that can now be added with the openness of NT's base.. So hopefully it's only to get better.. But only time will tell...


    Leave a comment:


  • ganamide
    replied
    Originally posted by -=Edge=- View Post
    +1 on that bool.. Would definitely make it a hole lot easier than how I'm currently doing it..

    You can iterate thru the Holidays for a particular instrument like this..

    Code:
     if(CurrentBar == 0)
     {
          foreach(var dt in Instrument.MasterInstrument.TradingHours.Holidays)
          {
               Print( dt.Key.ToString() + " " + dt.Value.ToString() );
          }
     }
    or using linq create a combined Partial/Holiday var and check for holiday bool..


    Code:
     if(Bars.IsFirstBarOfSession && IsFirstTickOfBar)
     {
         var mHoliday = (Instrument.MasterInstrument.TradingHours.Holidays.Select(a => a.Key).Union(Instrument.MasterInstrument.TradingHours.PartialHolidays.Select(a => a.Key)).OrderBy(a => a.Date));
          bool IsHoliday = mHoliday.Contains(Time[0].AddDays(1).Date) ? true : false;
          if(IsHoliday) Print(Time[0].AddDays(1).Date.ToString() + " Confirmed Holiday");   
          else Print(Time[0].AddDays(1).Date.ToString() + " Is Not Holiday"); 
     }
    Not sure you'd want to create a new var at the start of every session from an effiency standpoint, but keeping the code short and sweet, this should get you started..


    Thanks Edge! I was trying to wrap my head around comparing holidays with a date that is not the same date as the start of the session. Your DateTime.AddDays(1) makes it easy! This was just the code snippet I was looking for!

    Are you porting your Draw Bar tool to NT8? Will it be a free upgrade for people who bought your NT7 version? Looking forward to all the improvements we can make with NT8.

    Leave a comment:


  • -=Edge=-
    replied
    Originally posted by NinjaTrader_Dave View Post
    Thank you ganamide for that helpful suggestion. It definitely makes sense to have a boolean that can be quickly checked. I will pass that along to our team for consideration.
    +1 on that bool.. Would definitely make it a hole lot easier than how I'm currently doing it..

    You can iterate thru the Holidays for a particular instrument like this..

    Code:
     if(CurrentBar == 0)
     {
          foreach(var dt in Instrument.MasterInstrument.TradingHours.Holidays)
          {
               Print( dt.Key.ToString() + " " + dt.Value.ToString() );
          }
     }
    or using linq create a combined Partial/Holiday var and check for holiday bool..


    Code:
     if(Bars.IsFirstBarOfSession && IsFirstTickOfBar)
     {
         var mHoliday = (Instrument.MasterInstrument.TradingHours.Holidays.Select(a => a.Key).Union(Instrument.MasterInstrument.TradingHours.PartialHolidays.Select(a => a.Key)).OrderBy(a => a.Date));
          bool IsHoliday = mHoliday.Contains(Time[0].AddDays(1).Date) ? true : false;
          if(IsHoliday) Print(Time[0].AddDays(1).Date.ToString() + " Confirmed Holiday");   
          else Print(Time[0].AddDays(1).Date.ToString() + " Is Not Holiday"); 
     }
    Not sure you'd want to create a new var at the start of every session from an effiency standpoint, but keeping the code short and sweet, this should get you started..


    Leave a comment:


  • NinjaTrader_DaveI
    replied
    Thank you ganamide for that helpful suggestion. It definitely makes sense to have a boolean that can be quickly checked. I will pass that along to our team for consideration.

    In terms of sample code for using SessionIterator, we do not have anything prepared quite yet, other than the snippet on the page that you linked, but we may flesh this out further in the future.

    Just a quick tip -- did you know that you can edit previous posts on the forum? When you are logged in, you will see an Edit button at the bottom-right corner of your post that will allow you to make additions or changes.

    Leave a comment:


  • ganamide
    replied
    It would be really great if you guys could provide functions that take a DateTime parameter and return bool for IsHoliday and IsPartialHoliday. I've poked around with my debugger and your Holidays and PartialHolidays structures are not easy to use.

    Leave a comment:


  • ganamide
    replied
    Originally posted by ganamide View Post
    I want to exclude any trading day that is any type of holiday from my strategy. Do you have any sample code for how to do this? I noticed several fields with useful names under PartialHoliday.Constraint, but these don't seem to be documented and I am not sure how to interpret time fields that are coded as ints.

    Thanks,
    Chris
    I just found the documentation. The Constraint is a Session type and it's usage is defined here: http://www.ninjatrader.com/support/h...oniterator.htm

    Still would be nice to have sample code if you guys have it laying around.

    Leave a comment:


  • ganamide
    replied
    I want to exclude any trading day that is any type of holiday from my strategy. Do you have any sample code for how to do this? I noticed several fields with useful names under PartialHoliday.Constraint, but these don't seem to be documented and I am not sure how to interpret time fields that are coded as ints.

    Thanks,
    Chris

    Leave a comment:


  • ganamide
    replied
    Note: Trade Holidays are automatically updated from the NinjaTrader data server, to report an issue with a trade holiday or a missing holiday please contact platformsupport[AT]ninjatrader[DOT]com.

    Well I just found something in the docs that says NT will maintain, and users are to notify you of missing data. So when can I see an update?
    Last edited by NinjaTrader_James; 06-10-2015, 12:15 PM.

    Leave a comment:


  • ganamide
    started a topic Holiday Schedules - Update/Merge Plan

    Holiday Schedules - Update/Merge Plan

    I am excited to see that you have added Holidays to the platform that can be accessed via NinjaScript, however, the existing data does not seem to be current. For CME US Index Futures only last year's holidays are listed.

    What is the plan for maintaining these holidays? Will NT automatically update them for their users, or do we have to manually enter the data? If NT will provide updates, how will conflicts with manually entered data be handled?

Latest Posts

Collapse

Topics Statistics Last Post
Started by rexsole, Today, 11:48 AM
1 response
3 views
0 likes
Last Post NinjaTrader_PatrickG  
Started by jeronymite, Yesterday, 05:05 PM
3 responses
50 views
0 likes
Last Post NinjaTrader_ChristopherJ  
Started by Don22Trader1, Yesterday, 05:54 PM
3 responses
45 views
0 likes
Last Post NinjaTrader_Jesse  
Started by Jebulay, Today, 08:36 AM
1 response
38 views
0 likes
Last Post NinjaTrader_PatrickG  
Started by ShayeAus, Yesterday, 09:09 PM
4 responses
68 views
0 likes
Last Post bltdavid  
Working...
X