Announcement

Collapse
No announcement yet.

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.

        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().

            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 cmoran13, Yesterday, 01:02 PM
              0 responses
              23 views
              0 likes
              Last Post cmoran13  
              Started by PaulMohn, 04-10-2026, 11:11 AM
              0 responses
              16 views
              0 likes
              Last Post PaulMohn  
              Started by CarlTrading, 03-31-2026, 09:41 PM
              1 response
              160 views
              1 like
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 04-01-2026, 02:41 AM
              0 responses
              94 views
              1 like
              Last Post CarlTrading  
              Started by CaptainJack, 03-31-2026, 11:44 PM
              0 responses
              147 views
              2 likes
              Last Post CaptainJack  
              Working...
              X