Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

How to call a series from an indicator in the Strategy

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

    How to call a series from an indicator in the Strategy

    Hi,
    No issues calling up regular NT proved indicators.
    How do I instantiate my custom indicator correctly so that I can access all of its Series and read data from them.
    I do not want to plot it. I want to get the signals from it which are contained in a Series.
    I've tried many approaches but I am running into numerous errors and cannot find a resource on how to do this.

    Kind regards

    #2
    Oh dear i've inadvertently posted in NT7 I am using NT8 can a moderator possibly move this?

    Comment


      #3
      You just need to make this a property of the indicator the same way you make the plots a property with a type of Series<sometypehere> and then you can refer to that property on any instance of the indicator by its name.

      Like this:

      Code:
              [Browsable(false)]
              [XmlIgnore]
              public Series<double> SomeVectorName
              {
                  get { return MyDoubleSeries; }
              }​
      Bruce DeVault
      QuantKey Trading Vendor Services
      NinjaTrader Ecosystem Vendor - QuantKey

      Comment


        #4
        Hello OllieFeraher,

        To expose data that is not a Plot but is a series you can make a public property for that. For any other type of public value you need to use the Update method. You can find a sample that exposes a series and a public property that uses Update() in the following post. That also shows how you can call the indicator from another script.

        https://ninjatrader.com/support/help...alues_that.htm
        JesseNinjaTrader Customer Service

        Comment


          #5
          Thank you very much guys I will give this a go.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by mjbatts91, 04-30-2024, 04:48 PM
          3 responses
          26 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by betsuni_123, Yesterday, 04:20 PM
          2 responses
          19 views
          0 likes
          Last Post betsuni_123  
          Started by md4866, Yesterday, 08:15 PM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by reynoldsn, Yesterday, 07:11 PM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by PaulMohn, 04-30-2024, 02:06 AM
          9 responses
          26 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X