Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar Time based test

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

    Bar Time based test

    Ok I am trying to convert my NJ7 indicator to NJ8 and I am struggling with a bar Time test.

    In NJ7 I had captured a bar time value by using

    barIWantTheTimeOf.Set(Time[1]);

    which was declared in Initalize using

    private DateTimeSeries barIWantTheTimeOf;

    Then I was using the hour period of that captured time like this.

    if(Time.Hour[0] > barIWantTheTimeOf[0].Hour && Time.Hour[0] > (barIWantTheTimeOf[0].Hour +5)) {do something}

    As the set function has been replaced in NJ8 with something else my NJ7 code does not work.

    I have gone through the NJ8 manual but I am not seeing the alternative approach.

    Help please.

    #2
    Hello EastLondonKiwi, and thank you for your question. Any time you saw

    Code:
    Series.Set(Value)
    You can replace this with

    Code:
    Series[0] = Value
    Please let us know if there are any other ways we can help.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Jessica

      would you mind using my example and coding the correct Nj8 alternatives

      Thanks

      Comment


        #4
        Attached is a code sample that accomplishes this goal. Code samples we provide are for educational purposes, and are not intended for live trading, and are not guaranteed to accomplish any user goal or to be maintained.
        Attached Files
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          Jessica you are a star.

          Thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          636 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          366 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          107 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          568 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          571 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X