Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Data Box does not honor plot name changing

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

    Data Box does not honor plot name changing

    In OnStartuUp() is the first time I can see what the user configured. That affects what Data Box should show as the plot name. I set the plot name, but Data Box does not respond. Data Box responds fine to a plot line color being re-configured in the configuration dialog. It needs to also respond to the plot name change I do
    Code:
    Plots[nIndicator].Name = name + " line";
    If I am going about it wrong -- if there is a better way to set the plot name that will show up in the Data Box, then please tell me how to do it.

    If there is no better way, then please file a bug that this does not work.

    Absent this capability, all I can do is present a generic name in the Data Box -- not the end of the world, but also not all that nice. Note that this has to be recognized after OnStartUp(), because that is the soonest it is logically possible to set it.

    What does happen is that if the user brings the configuration dialog up again, the name changes to the one I set. That is way too late -- the name needs to get picked up after OnStartUp(). I am sure that the system is functioning "as designed" -- I am calling that design into question. OnStartUp() is the first chance I have to respond to any user configuration changes, and I do. The system needs to notice that right away, not some time later.

    Speaking of design, perhaps the problem is that Data Box is being controlled as a side effect of other changes, rather than allowing the indicator direct access to Data Box to make the necessary changes. Running things based on side effects is usually tricky, and often not the best design.

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

    #2
    ETFVoyageur, I will have someone get back to you early next week. Thank you.
    AustinNinjaTrader Customer Service

    Comment


      #3
      I am not sure what you are trying to do here.The name that shows in the DataBox, for the plot, is set directly when you define the plot in the Initialize() method, thus:

      Code:
      Add(new Plot(Color.Green, "[B]This is the name that shows in the DialogBox[/B]"));

      Comment


        #4
        koganam, I believe the issue is he is trying to change the name dynamically after the user inputs data. ETFVoyageur, can you confirm or deny that?
        AustinNinjaTrader Customer Service

        Comment


          #5
          Austin is right. This is another example of something that I do not have enough information to do until OnStartUp().

          For the most part I find the framework to be very nicely done. One thing that I find systematically lacking is the ability to set things from OnStartUp(), after I have had a chance to see what the user has configured and react appropriately.

          I write flexible indicators that give the user a lot of control / choice. That means I need to use OnStartUp() to take a look at what the user has done, and the do things such as set colors, set labels in the Data Box, decide which plots are needed and which are not, etc. It appears as if the framework does not generally take this need into account.

          In the case at hand, in RwbMA the user can choose one of 17 different moving averages to plot. I will not know their choice until OnStartUp(). It would be good if the Data Box could correctly identify the moving average in use, just as it could if the moving average were added directly. That requires me to be able to set the plot label from OnStartUp(). If I cannot do that, all I can do is supply some bland canned label such as "Indicator line". Not the end of the world, but not very user-friendly, either.

          I have tried setting the plot name, and that works. The problem, as noted in the original posting, is that Data Box ignores the fact I have set it. I need to either have Data Box check after my OnStartUp() has run, or else have an alternate way to do so.

          As a general comment, I am uneasy that Data Box is controlled by side effects, not directly. I'd be a lot happier with direct access to Data Box.

          --EV

          Comment


            #6
            From what I have deduced so far. OnStartup() seems to be little more than a replacement for what in NT6.5 we did with if (CurrentBar == 0){//code goes here}. There may be some hidden setup/housekeeping routines after Initialize(), and before OnStartUp() is run, but, in effect, I have found that anything that will not work by using if (CurrentBar == 0), will not work in OnStartUp(). I have actually found one instance when something did not work with OnStartUp(), and I had to fall back on the old standby. I did not investigate further, and suspect that it may have been a PBKAC.

            All of which is to say that the DataBox is probably populated from the configuration GUI, as part of the framework to setup the chart information flow. So by the time you get to OnStartUp() or (CurrentBar == 0), there is probably nothing to be done, as the configuration would have terminated already, and drawing on the chart is commencing, using the configured information flow parameters.

            I am still finding it hard to see why a user needs to define a plot name. They know what indicator they loaded, and what the plot line is called. You just need to make it descriptive enough to start off with.

            Just my $0.02.

            Comment


              #7
              Originally posted by koganam View Post
              From what I have deduced so far. OnStartup() seems to be little more than a replacement for what in NT6.5 we did with if (CurrentBar == 0){//code goes here}....
              So by the time you get to OnStartUp() or (CurrentBar == 0), there is probably nothing to be done, as the configuration would have terminated already, and drawing on the chart is commencing, using the configured information flow parameters.

              I am still finding it hard to see why a user needs to define a plot name. They know what indicator they loaded, and what the plot line is called. You just need to make it descriptive enough to start off with.

              Just my $0.02.
              Your analysis of what they are doing is probably correct. I believe that logic flow is a bug, but I expect it is what is happening.

              "by the time you get to OnStartUp() or (CurrentBar == 0)," and that is the issue. They may be equivalent today, but I argue that is a design bug if true. OnStartUp() is the first chance the code gets to react to the user's configuration settings. The framework should not think that configuration is done until after OnStartup(). It is should not be just a way to get if (CurrentBar==0) out of the OnBarUpdate)() function.

              As to why I care -- first of all, setting the plot name in Data Box is not the only issue. There are several issues.

              Why set the name? Well, RwbMA can be used to plot any of 17 moving averages. It would be nice if Data Box showed the actual moving average name. Supposed the user puts up two or three of them. Then the user has two or three Data Box entries that are identical, all labeled just "Indicator line", when each should have the name of the moving average the user is actually plotting. Suppose the user is using RwbMA to plot an SMA/EMA crossover pair. The two plots should be properly labeled -- SMA and EMA -- not just both saying "Indicator line". Not to mention if the user plots a third, perhaps very low lag one, such as ZLagEMA.

              As I said above, there are other similar issues. The Help page says that the Data Box will suppress showing a plot if the plot is Transparent. Well, if I set that in OnStartUp() it does not work. And OnStartUp() is the first place that I know enough to know which plots I do not want to have in Data Box, such as band edge plots that should not show unless the use configured to use bands.

              --EV

              Comment


                #8
                That makes absolute sense. I guess now we have to wait on them to make it a feature.

                Comment


                  #9
                  Thank you for the suggestions guys, we'll add them to our feedback list - currently updating the plots dynamically is not supported unfortunately.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  578 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  334 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  101 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  554 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  551 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X