Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Drawing lines in the future

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

    Drawing lines in the future

    I'm trying to draw a vertical line on a chart at a date sometime in the future say 30 days for example. The problem I'm running into is that if the date I try to draw the line falls on a holiday or weekend the line is not drawn and I need to draw the line on the nearest day.

    Is there an easy way to tell if a date sometime in the future will be on the chart? I'm thinking there should be because if I drag the chart to the left and hover my mouse over the chart I can see that certain dates are missing. I know I can easily write a function to tell if the day is a weekend but that doesn't help for holidays and I really don't want to have to make a list of holidays since that would require manual updates. I'm really hoping to avoid that with some built-in function or something...

    I was thinking I could do a DrawObjects.Count before and after I draw the line and if they're equal then assume the line didn't draw but I haven't tried that yet so I'm not sure if it would work and I'm really hoping there's a more elegant solution than that.

    #2
    LorneCash, thanks for the post - would at this time unfortunately not be aware of a more elegant way than a manual weekend / holiday check to ensure there would be a date. A dedicated holiday management tied to the session templates used is on our list for the next major platform upgrade.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by hazylizard, Today, 08:38 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by geddyisodin, Today, 05:20 AM
    2 responses
    17 views
    0 likes
    Last Post geddyisodin  
    Started by Max238, Today, 01:28 AM
    5 responses
    45 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by giulyko00, Yesterday, 12:03 PM
    3 responses
    13 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by habeebft, Today, 07:27 AM
    1 response
    16 views
    0 likes
    Last Post NinjaTrader_ChristopherS  
    Working...
    X