Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ToTime (Time [0])

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

    ToTime (Time [0])

    hello,

    I have a statement like this does not work:

    if (ToTime (openHour 1, openMinute, 0) == ToTime (Time [0]))

    I tried this too, the same pb:

    if ((ToTime (Time [0]) == ToTime (startTime.AddHours (1)))

    how can I do?

    Note: this works in 6.5

    #2
    Please be more specific as to why you feel it doesn't work and what you are experiencing instead. Thank you.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      I have this on 6.5:

      if (ToTime (startTime.AddHours (1). Hour, startTime.Minute, 0) == ToTime (Time [0]))
      {
      do something
      }

      to see if it works, I tested this

      if (ToTime (startTime.AddHours (1). Hour, startTime.Minute, 0) == ToTime (Time [0]))
      DraxTexteFixe

      and nothing appears, therefore, I supposue I can not fit in the loop.

      Comment


        #4
        Suggest you debug your code and print the components individually so you can evaluate it by hand.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          hello,

          I found the solution.
          The non-execution of this instruction was linked to the start time of the instrument.
          In choosing the Eurex Fixed (8h00-22h00), everything is back to normal.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          601 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          347 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          559 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          558 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X