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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        52 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        142 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        160 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        96 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        276 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X