Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing Data from custom Indicator

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

    Accessing Data from custom Indicator

    Hi

    I have a custom indicator thar keeps various lists of data dynamically so I don't want to create a new instance of the indicator each time I want to access data from it ... the lists it maintains need to stay in memory and be updated in background and not reset each time I access the data series provided from the indicator

    so if I place the following code in the initialize function

    MyCustomIndicator myCustomIndicator = MyCustomIndicator(parm1, parm2, parm3);

    Will the indicator work away in background keeping all its internal data so when if I say

    if (myCustomIndicator.myDSName[0] == 1)

    the calc the indicator is doing will be based on the lists it is maintaining?

    Or even better can I access data from the indicator I have added to the strategy window via the Add(myIndicator) call?

    Thanks

    Paul

    #2
    Hi Paul, yes you can access internal indicator data for reference, for this please review this reference sample - http://www.ninjatrader-support2.com/...ead.php?t=4991

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Hi Paul, yes you can access internal indicator data for reference, for this please review this reference sample - http://www.ninjatrader-support2.com/...ead.php?t=4991
      Hi Bertrand

      Thanks .. so by making the Add(myIndicator) call it sets my indicator up and running and puts it on my strategy chart and then making a series public I can access it in RT ... one thing how can I be sure the indicator is updated before the strategy looks at the data?

      Thanks

      Paul

      Comment


        #4
        The exposed dataseries objects will be in sync and updated, if you need this for a non dataseries one, just use Update() to make sure you get the current value returned.

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          The exposed dataseries objects will be in sync and updated, if you need this for a non dataseries one, just use Update() to make sure you get the current value returned.

          Bertrand

          many thanks

          Paul

          Comment

          Latest Posts

          Collapse

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