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 can an indicator detect where it is running?

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

    How can an indicator detect where it is running?

    I would like to detect whether my indicator is running in a panel or in a chart.

    I thought the "Overlay" variable would do that, but it seems to get set once and then never changed again.

    Specifically, I have checked in OnStartUp(), OnBarUpdate(), and in Plot(). Pulling up the configuration dialog and moving the indicator back and forth between a panel and the chart is not detectable with the Overlay variable.

    So how **am** I supposed to do it?

    Thanks,
    EV

    #2
    EV, unfortunately the assigned panel could not be accessed programmatically, for drawings you can check into DrawOnPricePanel - http://www.ninjatrader.com/support/h...pricepanel.htm
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks, but that does not seem to help..

      I do not want to control where I draw. I just want to find out which environment I am in so I can tailor a certain behavior appropriately.

      Neither Overlay nor DrawOnPricePanel seems to track where the indicator is, such that the indicator can read it and discover which it is in.

      Isn't there any way for an indicator to know which environment it is in?

      I do not want to change to the other environment. I do not want to draw in the other environment (that is a separate, and interesting, issue, though). I just want to know where I am running.

      --EV

      Comment


        #4
        EV, unfortunately you could not access the panel / environment where the indicator would run in - I suggest adding a custom input you can toggle then as needed.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          That thought has occurred to me -- pretty ugly to make the user set the same thing twice, but it can be done. The user would have to set "Panel" to control where the indicator goes, and then also set a custom parameter to tell the indicator what the configuration dialog already knows. Very ugly, but doable.

          Searching on the site I see that you have been considering at least since 2008 adding a way for an indicator to know where it is running. Obviously the sytem knows. Please just expose a read-only property so that the indicator can tell, too. For example, make "Overlay" track properly, so that reading it gets valid information.

          Thanks,
          EV

          Comment


            #6
            Thanks for sharing your thoughts.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by andrewtrades, Today, 04:57 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by chbruno, Today, 04:10 PM
            0 responses
            3 views
            0 likes
            Last Post chbruno
            by chbruno
             
            Started by josh18955, 03-25-2023, 11:16 AM
            6 responses
            436 views
            0 likes
            Last Post Delerium  
            Started by FAQtrader, Today, 03:35 PM
            0 responses
            7 views
            0 likes
            Last Post FAQtrader  
            Started by rocketman7, Today, 09:41 AM
            5 responses
            19 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X