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

Session template name, start and end time

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

    Session template name, start and end time

    Hello support,

    In NinjaTrader is there any way to get names, start and end time of session templates present in session manager through coding? I don't need Bars.Session.GetNextBeginEnd as it will give session time of current bar series only. But I need similar method to get time of certain session templates, something along the lines of

    For session names:
    Cbi.SessionList sessionTempList in Cbi.SessionList.GetObjects() similar to the way we get instruments list from instruments manager.

    For session start/end time:
    Session("Session template name").GetNextBeginEnd or only Session("Session template name").GetBeginEnd

    Please advise.

    Thanks,
    Last edited by Wajeeha; 02-16-2014, 09:20 AM.

    #2
    Hello Wajeeha,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    My colleague NinjaTrader_Bertrand offers up two examples of retreiving the session template information from both an indicator and strategy at the following link: http://www.ninjatrader.com/support/f...d.php?p=363430

    However, this is used in conjunction with an enum to pull the data after the user selects the session template. It can of course be adapted to pull the data you wish. Unfortunately, this is unsupported in NinjaScript, but NinjaTrader_Bertrand provides an indicator and information on using this with strategies.

    Please let me know if you have any questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by andrewtrades, Today, 04:57 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by chbruno, Today, 04:10 PM
    0 responses
    5 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by josh18955, 03-25-2023, 11:16 AM
    6 responses
    436 views
    0 likes
    Last Post Delerium  
    Started by FAQtrader, Today, 03:35 PM
    0 responses
    7 views
    0 likes
    Last Post FAQtrader  
    Started by rocketman7, Today, 09:41 AM
    5 responses
    19 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X