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

F5 -- how can I make that happen?

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

    #16
    • How do I know when to change from transparent to colored as the Indicators dialog comes up?

    • How do I know when to change from colored back to transparent when the Indicators dialog is taken down as a result of either Close of clicking the "X" button?

    • Finally, I do want to hear from Brett or equivalent that this will not cause any harm. I like the basic idea a lot, and would like to do the plot label (and the colors if we can figure out how to do the colors right), but I am not willing to cause harm.

    --EV

    Comment


      #17
      Originally posted by ETFVoyageur View Post
      1) What if there is only historical data? Back testing, not real time would have that case?

      Am I missing something?

      --EV
      The !Historical is there because you do not want to run this on every bar, which would cause an infinite loop regardless: one that you could only break by switching away from the chart window. Not good.

      The way that it is written means that even if CalculateOnBarClose is false, you will still not get into an infinite loop. However, to be even safer, I would add a FirstTickOfBar filter anyway, thus:

      Code:
                  if (!this.boolAlreadyRefreshed && !Historical && FirstTickOfBar) 
                  {
                      this.boolAlreadyRefreshed = true;
                      System.Windows.Forms.SendKeys.Send("{F5}");
                  }
      NT provides the Simulated Data and Market Replay Data feeds, so that one can always backtest on live or quasi-live data, if necessary.
      Last edited by koganam; 01-17-2011, 03:19 PM.

      Comment


        #18
        I was thinking of detecting whether or not to send the F5, and doing so if needed, in OnStartUp(). It's a one-time action.

        --EV

        Comment


          #19
          Originally posted by ETFVoyageur View Post
          • How do I know when to change from transparent to colored as the Indicators dialog comes up?

          • How do I know when to change from colored back to transparent when the Indicators dialog is taken down as a result of either Close of clicking the "X" button?

          --EV
          Not sure that I understand. You should not need to. The config GUI is used to capture user parameters, which are divorced from internal processing. Are you saying that if the Plot being transparent is not reflected back into the GUI, then the disappearing effect in the DataBox does not happen?

          Comment


            #20
            Originally posted by ETFVoyageur View Post
            I was thinking of detecting whether or not to send the F5, and doing so if needed, in OnStartUp(). It's a one-time action.

            --EV
            I thought of that, but then I concluded (without testing), that that should create an infinite loop.

            Comment


              #21
              Originally posted by koganam View Post
              Not sure that I understand. You should not need to. The config GUI is used to capture user parameters, which are divorced from internal processing. Are you saying that if the Plot being transparent is not reflected back into the GUI, then the disappearing effect in the DataBox does not happen?
              • The plots will be set to transparent.
              • The Indicators dialog is popped up
              • The plot will show in the dialog with whatever color it really had when the dialog popped up, not the one it was last configured to. In this case, that means it will show up transparent. It should show up with the user's color.
              • That means I need to catch the dialog coming up and set the color to the user's color
              • That, in turn, means that when the dialog goes down I need to set the plot back to transparent. If this is in time for Data Box, that's it -- if not, then I also need to do the F5 thing again.

              --EV

              Comment


                #22
                The plot will show in the dialog with whatever color it really had when the dialog popped up, not the one it was last configured to. In this case, that means it will show up transparent. It should show up with the user's color.
                Under the scheme, the user color is never changed, so should be in the config GUI as set. The Plot color is changed depending on the value of the user color. In effect, the plot color display is independent of the user color display. Value is simply passed and used.

                Comment


                  #23
                  The plot color has to get changed. Setting it transparent is what it takes to have the Data Box not show it.

                  --EV

                  Comment


                    #24
                    Originally posted by ETFVoyageur View Post
                    The plot color has to get changed. Setting it transparent is what it takes to have the Data Box not show it.

                    --EV
                    Hence my earlier question:

                    "Are you saying that if the Plot being transparent is not reflected back into the config GUI, then the disappearing effect in the DataBox does not happen?"

                    Comment


                      #25
                      No, that is not what I am saying. As best I can determine:
                      • Data Box does not care what color it enters the GUI as -- the user will, but Data Box does not.
                      • Data Box does care about what color it leaves the GUI as -- the user does not even see that, but Data Box cares

                      That means:
                      • It needs to be the user's color in the GUI
                      • It needs to be transparent on leaving the GUI. If we cannot make that happen fast enough then we need to set transparent and force Data Box to take another look (the F5 issue).
                      • It must remain transparent. If the user does an F5, or stops and starts the Data Box, it will pick up the then-current state.

                      Bottom line is that the plot needs to be transparent except when actually in the GUI. If we cannot get it transparent fast enough (OnStartUp is too late), then we need to give Data Box a kick (F5 issue).

                      --EV

                      Comment


                        #26
                        Originally posted by ETFVoyageur View Post
                        No, that is not what I am saying. As best I can determine:
                        • Data Box does not care what color it enters the GUI as -- the user will, but Data Box does not.
                        • Data Box does care about what color it leaves the GUI as -- the user does not even see that, but Data Box cares

                        Bottom line is that the plot needs to be transparent except when actually in the GUI. If we cannot get it transparent fast enough (OnStartUp is too late), then we need to give Data Box a kick (F5 issue).

                        --EV
                        I am still missing something then. According to what you write, then the Plot need not even be displayed in the GUI. Just get the user colors, leave them intact, change whatever plots it is necessary to change to transparent. The user's colors remain in the config GUI because they are never changed. At best, they would be described as a reference.

                        I guess I am going to have to see a sequence of pictures before I will be able to understand.

                        Comment


                          #27
                          What you are forgetting is that the plots are band edges, and are sometimes visual on the chart and sometimes not. If the user configures the bands on, then all is as normal, the plots display and I am not trying to suppress display in the Data Box. That's one reason why the plots need to appear in the GUI -- the user should be able to configure how they look when visible.

                          The other reason is because the moving average line needs to appear in the GUI, and plots in the GUI is all-or-nothing. I cannot leave the bands out of the GUI even if I wanted to, because I have to have the moving average there.

                          Even when the user has bands configured off, the plot configuration area should still show the user's plot colors. Partly to avoid surprising the user, and partly because if the user turns them on, he should not be forced to set his own colors again.

                          --EV

                          Comment


                            #28
                            Originally posted by koganam View Post
                            I guess I am going to have to see a sequence of pictures before I will be able to understand.
                            Give RwbMA a try (get it from the enhanced moving average thread). Set up something with bands on. Bring up the Indicators dialog and turn them off. exit. Bring up the dialog again and turn them back on. etc

                            I believe the user experience will be what you would expect, with the possible exception of Data Box. I would like to be able to suppress the bands' display in Data Box when the bands are not being displayed on the chart. (That's what this whole discussion is about.)

                            I believe the experience with the Indicators dialog should remain unchanged, however.

                            By the way, FWIW, my private copy has the correct labels showing in the data box -- you have to manually give the F5 though -- and it is LOTS nicer than just showing "Indicator line" as a label. That will be in the next public release, even if I cannot make it automatically happen.

                            --EV

                            Comment


                              #29
                              Please take a look at this

                              Originally posted by ETFVoyageur View Post
                              What you are forgetting is that the plots are band edges, and are sometimes visual on the chart and sometimes not. If the user configures the bands on, then all is as normal, the plots display and I am not trying to suppress display in the Data Box. That's one reason why the plots need to appear in the GUI -- the user should be able to configure how they look when visible.

                              The other reason is because the moving average line needs to appear in the GUI, and plots in the GUI is all-or-nothing. I cannot leave the bands out of the GUI even if I wanted to, because I have to have the moving average there.

                              Even when the user has bands configured off, the plot configuration area should still show the user's plot colors. Partly to avoid surprising the user, and partly because if the user turns them on, he should not be forced to set his own colors again.

                              --EV
                              If you will, take a look at this, and tell me why it is not doing what you describing. As far as I understood it, I think that it is.

                              See how you can change the plot color, without seeing the plot. Of course, if you want you can disclose the plot, using the PlotsConfigurable boolean.

                              Does the plot not get hidden in the DataBox, the way you describe if the MAType is set to "None"?

                              I left out the F5 refresh, because I was just trying to see how I am misunderstanding your intent.

                              It also shows how I avoid polluting the global namespace.
                              Attached Files

                              Comment


                                #30
                                Originally posted by koganam View Post
                                See how you can change the plot color, without seeing the plot. Of course, if you want you can disclose the plot, using the PlotsConfigurable boolean
                                I'll take a look, but just from what you say here I have a comment. The NT paradigm is that users can configure lines in the GUI -- generally lines that are displayed in the Plot section. You can certainly solicit the information in other ways, and I have written indicators that do.

                                In this case, you have up to 5 plots to contend with. Minimally three, if you require that both inner band lines be alike and both outer band lines be alike. That is an awful lot of alternate configuring of line style, dash style, and color if you don't actually show the plots.

                                I note that you use the word "plot" in the singular, and talk of PlotsConfigurable, which is an all-or-nothing setting. In the case I am talking about, 5 lines are going to be plotted (at least some of the time), and they are of at least two different logical types -- a moving average and band edges.

                                OK -- I'll go look at your sample now.

                                --EV

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by helpwanted, Today, 03:06 AM
                                1 response
                                11 views
                                0 likes
                                Last Post sarafuenonly123  
                                Started by Brevo, Today, 01:45 AM
                                0 responses
                                9 views
                                0 likes
                                Last Post Brevo
                                by Brevo
                                 
                                Started by aussugardefender, Today, 01:07 AM
                                0 responses
                                5 views
                                0 likes
                                Last Post aussugardefender  
                                Started by pvincent, 06-23-2022, 12:53 PM
                                14 responses
                                242 views
                                0 likes
                                Last Post Nyman
                                by Nyman
                                 
                                Started by TraderG23, 12-08-2023, 07:56 AM
                                9 responses
                                387 views
                                1 like
                                Last Post Gavini
                                by Gavini
                                 
                                Working...
                                X