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 CarlTrading, 03-31-2026, 09:41 PM
          1 response
          47 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          23 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          33 views
          1 like
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          50 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          42 views
          0 likes
          Last Post CarlTrading  
          Working...
          X