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

SessionEnd

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

    SessionEnd

    Id like to adjust my strategy to enter orders with 30 minutes to go in the session, which I could do by just counting out with BarsSinceSession, however trading a number of products with different start times makes that a bit difficult. Is Bars.Sessionend relevant here?

    #2
    You could subtract from SessionEnd if you want, sure.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh, is there an example of what this would look like somewhere?

      Something Like

      If (Bars.SessionEnd - Bars.CurrentBar < N)
      Last edited by maninjapan; 10-16-2009, 11:26 AM.

      Comment


        #4
        No, Bars.SessionEnd is just a timestamp. You would need to do the math by hand.

        ToTime(Bars.SessionEnd) gives you the time as an int and you will need to compare it to ToTime(Time[0]) to get another int for the bar time.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ETFVoyageur, Today, 07:05 PM
        0 responses
        4 views
        0 likes
        Last Post ETFVoyageur  
        Started by Orion815, 05-02-2024, 08:39 AM
        2 responses
        17 views
        0 likes
        Last Post Orion815  
        Started by suroot, 02-25-2017, 04:43 AM
        11 responses
        2,549 views
        0 likes
        Last Post Zilvercat  
        Started by Rogers101, 05-05-2024, 11:30 AM
        16 responses
        50 views
        0 likes
        Last Post Rogers101  
        Started by ninza33, Today, 12:31 PM
        2 responses
        12 views
        0 likes
        Last Post ninza33
        by ninza33
         
        Working...
        X