Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom Indicators again ...

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

    Custom Indicators again ...

    Hi

    if for example in the initialize function I add ..

    Add(SampleBoolSeries(x,y,z));

    and then in the update function I have

    if (SampleBoolSeries(x,y,z).BullIndication[0]) EnterLong();

    will the instance of SampleBoolSeries being referenced in the update function be the exact same one that is in the initialize section. It seems probably not since I could input different parameters into the two calls?

    It is REALLY important for me to reference the same instance of the indicator since it is calculating data with milli-second precision using the time from the pc so I need what I see plotted and what the strategy to be acting upon to be the exact same?

    Thanks

    Paul

    #2
    If it is the same parameters it is the same instance. Otherwise it is a new instance.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      If it is the same parameters it is the same instance. Otherwise it is a new instance.
      Great!

      And one last thing ... if CalculateOnBarClose is to false am I correct in assuming that I should not have to call Update() in order to ensure the indicator dataseries are always up to date?

      Thanks Josh

      Comment


        #4
        CalculateOnBarClose has no impact on when you should or should not call Update(). Please see the SampleBoolSeries reference to see when Update() is called there.
        Josh P.NinjaTrader Customer Service

        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