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

Retrieving price data when indicator input series is another indicator

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

    Retrieving price data when indicator input series is another indicator

    When an indicator's input series is another indicator, I notice that Open, Close, High and Low return values from the input series (meaning from that other indicator) rather than returning price data. But indicator-on-indicator will eventually lead to a price data series (even if it's a sequence of more than two indicators). Is there a way – hopefully easy – to get at that price data series?

    #2
    Does the Help topic "Tutorials | Indicators | Beginner - Indicator on Indicator" answer your question?

    --EV

    Comment


      #3
      No. That example implements indicator-on-indicator by embedding the target indicator within the code of the calling indicator. I'm looking at writing an indicator where the target indicator will be selected at run time using the Input Series parameter in the Indicators window. But then I still want to be able to get at the chart's price data.

      Comment


        #4
        Mike, in that case you would need to Add() the pricedata needed to be able to access it programmatically.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          But Add() has to go in Initialize(), right? And it doesn't allow variables, right? So how do I say, "If this is a 5-minute ES chart, add ES 5-minute price data. But if this is a 1-minute ES chart, add ES 1-minute data"?

          The general question would be, How do I determine and then add the price data at the end of the indicator-on-indicator chain?

          Comment


            #6
            You would setup string inputs for your script to be able to set / enter which symbol's data and timeframe to Add() then, this would work in the Initialize().
            BertrandNinjaTrader Customer Service

            Comment


              #7
              I guess that works, but it's certainly not an elegant solution! Every indicator eventually leads to price data, right? (The indicator runs against price data. Or the indicator runs against an indicator that runs against price data. Or the indicator runs against an indicator that runs against an indicator that runs against price data. And so on.) It sure seems that it should be possible to get to that price data without needing outside input.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by DJ888, 04-16-2024, 06:09 PM
              6 responses
              18 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by Jon17, Today, 04:33 PM
              0 responses
              1 view
              0 likes
              Last Post Jon17
              by Jon17
               
              Started by Javierw.ok, Today, 04:12 PM
              0 responses
              6 views
              0 likes
              Last Post Javierw.ok  
              Started by timmbbo, Today, 08:59 AM
              2 responses
              10 views
              0 likes
              Last Post bltdavid  
              Started by alifarahani, Today, 09:40 AM
              6 responses
              41 views
              0 likes
              Last Post alifarahani  
              Working...
              X