Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Panel question

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

    Panel question

    Hi,

    Is it possible to programmatically set the panel to same as indicator series? I have an indicator that takes awhile to load at times and if I forget to change the Panel selection, I end up with an annoying empty panel at the bottom of my chart.

    I would like to force the selection to same as indicator series when the indicator is loaded to avoid having to go back and change this to get rid of the extraneous panel.

    Also, I would like to set AutoScale to false to keep from having the scaling take into account lines I am drawing which may be quite far from price. I have AutoScale = false in Initialize() but this seems to be ignored.

    Thanks
    Scott

    #2
    Hello Scott,

    Thank you for your post.

    You will need to use DrawOnPricePanel = True; to add the indicator plots to the main panel where the price is listed.
    For information on DrawOnPricePanel please visit the following link: http://www.ninjatrader.com/support/h...pricepanel.htm

    Once complete please let me know if when you right click in your chart and select Indicators and your indicator if the AutoScale property is set to false appropriately.

    Comment


      #3
      Patrick,

      Thanks for getting back to me so quickly. I forgot to mention; I am not plotting anything, only using DrawLine for the levels. From the documentation, this does not appear to matter but thought I would mention it.

      I tried this with true (I originally had it at false) but I still get New Panel as the default for Panel although the scaling is now correct.

      Best Regards,
      Scott

      Comment


        #4
        Originally posted by ScottB View Post
        Patrick,

        Thanks for getting back to me so quickly. I forgot to mention; I am not plotting anything, only using DrawLine for the levels. From the documentation, this does not appear to matter but thought I would mention it.

        I tried this with true (I originally had it at false) but I still get New Panel as the default for Panel although the scaling is now correct.

        Best Regards,
        Scott
        To load an indicator into the Price Panel on addition to the list, you need:
        Code:
         
        Overlay = true;
        in the Initialize() event/method.

        Consult the NT Help for details.

        Comment


          #5
          koganam,

          I am drawaing only, not plotting but what I really want is the Panel property in the indicator properties box to default to same as input series.

          Best Regards,
          Scott

          Comment


            #6
            Originally posted by ScottB View Post
            koganam,

            I am drawaing only, not plotting but what I really want is the Panel property in the indicator properties box to default to same as input series.

            Best Regards,
            Scott
            I understood what you asked. The answer that I gave you is still the correct one. Read the NT Help.

            Comment


              #7
              After all these years of using NinjaTrader, it is amazing that I didn't think of reading the documentation before I posted a question. What could I have been thinking?

              @NinjaTrader support - in case it wasn't clear, koganam's answer didn't address my issue nor help in any way and therefore I would still like to hear from you. To be clear once more, everything works correctly as is; I am trying to get the default set automatically as I mentioned above when I add the indicator to a chart.
              Last edited by ScottB; 01-22-2013, 10:31 AM.

              Comment


                #8
                Hello,

                I'm not certain I understand entirely what's not displaying properly.

                Setting

                Code:
                Overlay = true;
                in Initialize() will make the indicator plot on the input series by default.

                Perhaps we could better assist if you provide a screenshot of the error you're seeing.

                To attach a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image.

                Lastly, save as a jpeg file and send the file as an attachment using the advanced post options.

                For detailed instructions please visit the following link
                How to take a screenshot on your smartphone, tablet, notebook or desktop computer


                I look forward to assisting you further.
                LanceNinjaTrader Customer Service

                Comment


                  #9
                  Lance,

                  Patrick already resolved this issue. It was a combination of other settings I had in my code but it is working now.

                  Thanks,
                  Scott

                  Comment


                    #10
                    I am adding to this thread rather than start a new one because the issues may be related.

                    My indicator only uses DrawLine and does no plotting. Due to the calculations there are many lines drawn which under normal circumstances would be "off" the chart (i.e. outside the range NinjaTrader plots if the indicator is not applied to the chart).

                    The chart is scaling using every line drawn which results in bars so small as to be virtually unusable. I have the following code in Initialize() and also the corresponding properties show in the indicator properties box.

                    CalculateOnBarClose = true;
                    AutoScale =
                    false;
                    DrawOnPricePanel =
                    true;
                    Overlay =
                    true;

                    Any thoughts or is this just a bug I have to live with?

                    Best Regards,
                    Scott

                    Comment


                      #11
                      Hello Scott,

                      Thank you for your post.

                      Yes, you can set the AutoScale of the DrawLine() to false using one of the following syntax lines for the DrawLine() method:
                      • DrawLine(string tag, bool autoScale, int startBarsAgo, double startY, int endBarsAgo, double endY, Color color, DashStyle dashStyle, int width)
                      • DrawLine(string tag, bool autoScale, DateTime startTime, double startY, DateTime endTime, double endY, Color color, DashStyle dashStyle, int width)

                      For information on DrawLine() please visit the following link: http://www.ninjatrader.com/support/h...7/drawline.htm

                      Please let me know if I may be of further assistance.

                      Comment


                        #12
                        Patrick,

                        Thanks for your help. Of all the Drawline calls I had in the indicator, exactly one had AutoScale set to true and that did it. Once I fixed that, things work as expected. Such is the life of a programmer.

                        Best Regards,
                        Scott

                        Comment


                          #13
                          Originally posted by ScottB View Post
                          Patrick,

                          Thanks for your help. Of all the Drawline calls I had in the indicator, exactly one had AutoScale set to true and that did it. Once I fixed that, things work as expected. Such is the life of a programmer.

                          Best Regards,
                          Scott
                          Never understimate the wicked humor of the programming gods.

                          Comment


                            #14
                            Lol, so true, so sadly true.

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by helpwanted, Today, 03:06 AM
                            1 response
                            10 views
                            0 likes
                            Last Post sarafuenonly123  
                            Started by Brevo, Today, 01:45 AM
                            0 responses
                            8 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
                            386 views
                            1 like
                            Last Post Gavini
                            by Gavini
                             
                            Working...
                            X