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 do I prevent a plot showing in the Data Box?

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

    How do I prevent a plot showing in the Data Box?

    When the user's configuration is set so that outer band plot lines are not wanted, I do suppress them. I should also suppress them appearing in the Data Box. The Help information says
    Please note plots set to transparent, and Indicators or Data Series with the "Display in Data Box" parameter set to false will NOT be displayed in the Data Box.
    The user can set transparent all he wants to, and that is fine. It is a big problem for the code to set transparent for that reason, though. The problem is that the code is doing so just to handle an unrelated thing -- the Data Box. That means the code needs to save and restore user colors.

    Saving and restoring user colors is always a Bad Idea. The problem is that the user may save that as a template (including the altered user colors). When that template is reloaded all notion of the user's real colors will have been lost; it will be impossible to restore them. That means the ONLY solution for the code is

    "Display in Data Box" parameter set to false
    How do I do that?

    --EV
    Last edited by ETFVoyageur; 01-15-2011, 06:40 AM.

    #2
    I've already answered your question in another thread. In the future, please keep all similar queries in the same thread. Thank you.

    People have been saving and restoring colors for quite a while now.. You may want to search the forum for "serialize color" and other related terms to find the solutions. I can't offer more help because it is unsupported, but it is definitely possible.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Does saving and restoring colors work across things like popping up a configuration dialog, or saving the chart as a template and restoring it? Those are the areas where I ran into trouble. I thought I was doing fine until I ran into those cases.

      I'll take a look where you suggested and see what they have to say. By the way, I note your "unsupported" comment. That sounds as if saving and restoring user colors is unsupported, even if there is a way to make it work.

      ---EV

      Comment


        #4
        ETFVoyageur, I just found some information on this.

        Please see this thread for details on user definable color inputs.
        AustinNinjaTrader Customer Service

        Comment


          #5
          To be clear, and to be sure we are all discussing the same thing, let me summarize this specific issue and where the discussion is at the moment. The topic is
          How do I prevent a plot showing in the Data Box
          What I need to do:
          • I need to prevent some, but not all, of the indicator's plots from appearing in the Data Box. For example, I do not want the moving average bands to appear in the Data Box unless the user has configured them on. Whether or not any bands are being applied, the moving average itself should still be displayed.

          • That means the code has no way to know whether or not the plots for the bands should be shown in the Data Box until it can see the result of the user's configuration -- after the user has pressed "OK" or "Apply" in the configuration dialog box. The first time the program has enough knowledge to do anything is in OnStartUp().

          • Put together, than means the issue must be handled dynamically (to respond to a user configuration choice) and it cannot be handled before OnStartUp() (because that is the soonest that the user's choice is known to the program).

          The relevant Help text is
          Please note plots set to transparent, and Indicators or Data Series with the "Display in Data Box" parameter set to false will NOT be displayed in the Data Box.
          • The first choice, making the plot transparent, does not solve the problem. If the plot is made transparent after the configuration dialog has closed, such as in OnStartUp(), that is too late -- Data Box fails to notice it.

          • There is an IndicatorBase property, DisplayInDataBox. This is not the answer, because setting it false it causes the whole indicator to not display.

          • As I read the Help text, there is some way to to set each individual DataSeries to not display in the data box. That should work, provided setting it in OnStartUp() will work.

          So the questions on the table are:
          • How do I set a single DataSeries to not display? I have not been able find anything on that question -- either in Help, Intellisense, or previous postings in this thread.

          • If I can set a single DataSeries to not display, does that solution work if I do it in OnStartUp()?

          I believe that is a pretty clear summary of this specific issue. As I understand it, the answers may have to wait until certain people are back at work on Monday.

          --EV

          Comment


            #6
            Thank you for the detailed response. Yes, I will have someone get back to you tomorrow.
            AustinNinjaTrader Customer Service

            Comment


              #7
              The first choice, making the plot transparent, does not solve the problem. If the plot is made transparent after the configuration dialog has closed, such as in OnStartUp(), that is too late -- Data Box fails to notice it.
              I am curious. I understand what you are saying in the first instance. Here is my question. Assume that the user has made his choices and you try to set plots transparent, but it fails as you indicate. What happens if you reload the indicator with F5? Does the DataBox now behave correctly?

              I am sure that you know where I am going with this one.

              Comment


                #8
                Before I gave up on setting transparent, I was leaving it set as the user brought up the Indicators dialog. When that dialog was dismissed, then Data Box behaved correctly. In other words, In other words, it evidently needs to be set during configuration time.

                As a test, I found that all one has to do is in the configuration dialog set the plot color to transparent, and it will go away in the Data Box. That's of course not acceptable in a working indicator, but it does show that Data Box honors the setting -- just not dynamically

                --EV

                Comment


                  #9
                  Understood, but my question is a little different. You indicate that when you try to set it dynamically, the DataBox is uncooperative. What I am asking is that: "After you set it dynamically in the first instance, the DataBOx will not take it. What happens if you now with the indicator loaded, use f5 to reload the indicator? Does the DataBox now look like you want it to?"

                  Comment


                    #10
                    Ev, to clarify - the plots are enabled / disabled per indicator - you could not do this individually per plot unfortunately.
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      Please note plots set to transparent, and Indicators or Data Series with the "Display in Data Box" parameter set to false will NOT be displayed in the Data Box.
                      Understood. There is no per-plot DisplayInDataBox value.

                      Might I suggest that the Help wording "Data Series with the Display in Data Box parameter set to false" sure sounds as if there is a parameter for the DataSeries that can be set? Especially since the preceding phrase "plots set to transparent" is per-plot.

                      Perhaps the Help text needs re-wording?

                      --EV

                      Comment


                        #12
                        I have been struggling with this also, as I have different color plots for the same value using the Plots[0].Min structure. Unfortunately, it leaves me with multiple itterations of the data in the databox.

                        Perhaps for a revision, you (NinjaTrader) could make the DisplayInDataBox dataseries specific in the same way as all of the other multiseries data, ie

                        DisplayInDataBoxs[0], etc, or even DisplayInDataBoxes[1]

                        I have not requested features, so I imagine this is not the prefered place to do it, but this would be a 'nice' feature, even if not a 'must have' feature.

                        Comment


                          #13
                          Hi fctrader,

                          Thanks for the suggestion. It would add an extra level of control.

                          The color changing technique you're using has been improved for version 7, where you can assign plot colors conditionally without requiring multiple plots. This new technique is outlined here, in the V7 file:
                          Ryan M.NinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by arvidvanstaey, Today, 02:19 PM
                          4 responses
                          11 views
                          0 likes
                          Last Post arvidvanstaey  
                          Started by samish18, 04-17-2024, 08:57 AM
                          16 responses
                          60 views
                          0 likes
                          Last Post samish18  
                          Started by jordanq2, Today, 03:10 PM
                          2 responses
                          9 views
                          0 likes
                          Last Post jordanq2  
                          Started by traderqz, Today, 12:06 AM
                          10 responses
                          18 views
                          0 likes
                          Last Post traderqz  
                          Started by algospoke, 04-17-2024, 06:40 PM
                          5 responses
                          47 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Working...
                          X