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 to set Indicator to be on Price Panel ONLY

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

    How to set Indicator to be on Price Panel ONLY

    Hi
    I have an indicator that plots a grid on the chart with some buttons in it.
    I have set DrawOnPricePanel to true.
    I have set IsOverlayToTrue.
    I have even set the indicator up and saved it as a template on the price panel.
    Yet still it insists on putting it in a new panel as the default.

    Can you help?

    #2
    Hello,

    Thank you for your post.

    With most indicators, you can select the panel displayed. In the indicators menu with the particular indicator selected in the properties side of the menu scroll to "panel" and select "same as input series" to have the indicator plot within the main chart panel. If this doesn't work for you and the indicator in question is third party please reach out to the developer of the add-on for further assistance.
    Sean H.NinjaTrader Customer Service

    Comment


      #3
      Hi Sean_H
      What I am attempting to do is set the panel in script/indicator settings ie it's always on the price panel NOT a separate panel. That's my question.

      Comment


        #4
        Hello Mindset,

        Thanks for your note.

        The IsOverlay property determines if the indicator will plot on the price panel or in a separate panel.

        When IsOverlay is set to 'true' in State.SetDefaults, the indicator will plot on the price panel.

        See this help guide page for more information about the IsOverlay property: https://ninjatrader.com/support/help.../isoverlay.htm

        Please ensure that IsOverlay is set to 'true' in your script. Then, remove the indicator and re-add it to the chart. Does the indicator still plot on a separate panel?

        If so, please send me a screenshot showing the behavior you are reporting and an exported copy of the script.
        • To send a screenshot with Windows 10 or newer I would recommend using the Windows Snipping Tool.
        • Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save it as a jpeg file and send the file as an attachment.
        Exporting: https://ninjatrader.com/support/help...scriptAsSource Files

        Please let me know if you have further questions on this.
        Last edited by NinjaTrader_BrandonH; 03-29-2023, 07:40 AM.
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          Click image for larger version  Name:	seppanelindicator.jpg Views:	107 Size:	136.1 KB ID:	1244132hi
          No I still get the same behaviour with isOverlay = true.
          removeHray.zip

          Comment


            #6
            Hello Mindset,

            Thanks for your note.

            Please send me an exported copy of your script so that I may look into this further.

            To export a NinjaScript, go to Control Center > Tools > Export > NinjaScript Addon.

            Exporting: https://ninjatrader.com/support/help.../exporting.htm

            Thanks in advance; I look forward to assisting further.
            Brandon H.NinjaTrader Customer Service

            Comment


              #7
              Brandon
              its attached to the last post

              Comment


                #8
                Hello MindSet,

                Thanks for your note.

                Since the export you shared requires access to a third-party LizardIndicators reference I am not able to test the script on my end.

                If I uncomment the LizardIndicators reference I see that the indicator is only running on the price panel. See the attached screenshot. It could be that using the third-party LizardIndicators in the script is causing the behavior you are reporting.

                Note that using a third-party AddOn in a NinjaScript goes beyond the support we would be able to provide

                Debugging steps could be taken to see what the exact line of code in the script is causing the behavior you are reporting.Below is a link to a forum post that demonstrates how to use prints to understand behavior.
                https://ninjatrader.com/support/foru...121#post791121

                You could consider reaching out to LizardIndicators directly for instructions on how to use their indicators in your custom NinjaScript so that it only adds the custom indicator to the price panel.

                Let me know if I may assist further.​
                Attached Files
                Brandon H.NinjaTrader Customer Service

                Comment


                  #9
                  Brandon


                  I made a whole new button project and now I get the correct behaviour on the new project. It would be nice to know what was causing that as I just cannot see it!!

                  Comment


                    #10
                    Hello MindSet,

                    As a heads up, our staff does not provide debugging services, but we can assist you through the process so that you can debug the script your self.

                    Unfortunately, in the support department at NinjaTrader it is against our policy to create, debug, or modify, code or logic for our clients. Further, we do not provide C# programming education services or one on one educational support in our NinjaScript Support department. This is so that we can maintain a high level of service for all of our clients as well as our associates.

                    That said, through email or on the forum we are happy to answer any questions you may have about NinjaScript if you decide to code this yourself. We are also happy to assist with finding resources in our help guide as well as simple examples, and we are happy to assist with guiding you through the debugging process to assist you with understanding unexpected behavior.

                    You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.


                    Would you like to go through the process of adding prints and understanding the differences in behavior?​
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Chelsea_B
                      Appreciate the response but if I get unexpected behaviour you will always have to look at the code - your answer that IsOverlay = true solves the issue didn't work ( I agree it should have solved it) so I was kind of left in limbo.
                      As it was I copied the code changed the name and voila it works - so you tell me how is that possible? - that one logic doesn't work and the same logic with a different name does?
                      I posted this issue because maybe there is a tiny bug somewhere or a setting that interferes with expected behaviour?

                      Is it a ghost in the machine? lol. just venting. It took hours to work this out and I never found the solution - that is such a waste of time.
                      Enough. Time to move on.

                      Comment


                        #12
                        Hello Mindset,

                        Thanks for your note.

                        To clarify, you are reporting that your custom indicator was not drawing on only the price panel when IsOverlay is set to true in the script.

                        Then, you made a copy of the script by right-clicking in the code of the indicator > selecting 'Save as' > naming the copy of the script > and running a compile without making any changes at all.

                        Once the copy of the script was run on a chart, you saw the indicator draw only on the price panel as expected. Is that correct?

                        If you test the prior indicator and the new copy of the indicator, do you see that the indicators behave differently?

                        If you use a Diff Checker on the indicator scripts, do you see differences in their code? You could do a quick Google search for 'Diff Checker' to find one to use.

                        Let me know if I may assist further.

                        Brandon H.NinjaTrader Customer Service

                        Comment


                          #13
                          I just had the same exact behavior. My indicator would print on the price panel instead of the indicator panel.
                          I was using in State.SetDefaults:

                          IsOverlay = false;
                          DisplayInDataBox = true;
                          DrawOnPricePanel = false;

                          I could get the code to plot to the indicator panel by selecting 'new panel' in the indicator once it was on the chart,
                          but natively it would plot on the price panel.
                          I could not figure out why until I saw this post. I renamed it, and that fixed the issue.
                          I didn't do anything but rename the indicator.
                          That allowed the indcator to natively plot on the indicator panel.
                          So, based on that, I am thinking, the code may have been corrupted or not compiled correctly?
                          Not sure if there may be a hidden bug somewhere.

                          Just reaffirming, this is an issue. and the solution is to rename the indicator using 'save as'.​

                          Comment


                            #14
                            I figured out what was causing the divergent behavior.
                            It must be a resource that is associated with the indicator.
                            In this case, it was a 'template' had been created for this indicator.
                            In the dev process, I had changed the IsOverlay or DrawOnPricePanel settings.
                            When I saved a template to change a line width, those original IsOverlay or DrawOnPricePanel settings
                            must be saved in the template cache associated with the indicator.
                            When using 'save as' to change the name, it meant there were no longer any templates or shared resources with
                            the indicator that could change the expected behavior.

                            *Hence, a good practice for development is to not save 'templates' for the indicator while in dev or at least beware
                            of the possibility of those cached settings being divergent from the code.
                            It is a not a bug, just a weird case that I had not accounted for.

                            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