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 istinethomas, Today, 03:31 AM
          0 responses
          5 views
          0 likes
          Last Post istinethomas  
          Started by joselube001, 05-10-2024, 12:17 PM
          7 responses
          46 views
          0 likes
          Last Post esatino
          by esatino
           
          Started by kevinenergy, 05-09-2024, 12:01 PM
          9 responses
          41 views
          0 likes
          Last Post jeronymite  
          Started by ETFVoyageur, Yesterday, 07:49 AM
          2 responses
          14 views
          0 likes
          Last Post jeronymite  
          Started by anton_tymoshchuk, Yesterday, 01:14 AM
          4 responses
          25 views
          0 likes
          Last Post anton_tymoshchuk  
          Working...
          X