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

Modifications to chart WPF elements and tab considerations

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

    Originally posted by Unsuitable View Post
    Hello aligator,

    Do you mean the specific c# code? I pulled this from ChelseaB's sample code.
    Yes, basically I want to create a button indicator for NT8 main menu that would use a geometric path, EW ABC, 12345 wave, etc, as an icon. I am looking for the NT8 C# sample script or indicator..

    Thanks.

    Comment


      Hello aligator,

      An example of using Path Geometry in a Menu or Button can be found in the SampleWPFModifications example script.
      https://ninjatrader.com/support/foru...07#post1124507
      Last edited by NinjaTrader_ChelseaB; 05-18-2021, 09:19 AM.
      Chelsea B.NinjaTrader Customer Service

      Comment


        Originally posted by aligator View Post

        Yes, basically I want to create a button indicator for NT8 main menu that would use a geometric path, EW ABC, 12345 wave, etc, as an icon. I am looking for the NT8 C# sample script or indicator..
        If I understand correctly, there's no need to use an Icon path. Use a regular button and set the content to EW ABC, 12345 wave, etc. A regular button does not require an icon. Refer to post #167 for the example script.

        Unsuitable
        NinjaTrader Ecosystem Vendor - Ocean Trading Indicators

        Comment


          Originally posted by Unsuitable View Post

          If I understand correctly, there's no need to use an Icon path. Use a regular button and set the content to EW ABC, 12345 wave, etc. A regular button does not require an icon. Refer to post #167 for the example script.
          Thanks. Understnd, but I do not want to have a blank button or show text. I want to experiment with a geometric shape, vectors, or a path, etc.

          Comment


            Originally posted by aligator View Post

            Thanks. Understnd, but I do not want to have a blank button or show text. I want to experiment with a geometric shape, vectors, or a path, etc.
            Ok well post #165 is how I achieved custom icons via Inkscape.
            Unsuitable
            NinjaTrader Ecosystem Vendor - Ocean Trading Indicators

            Comment


              When I add the indicator "Sample WPF Modifications" to a chart and then duplicate the chart to a new tab and then close the newly added tab by clicking on the "x" in the tab then I get "Unhandled exception: Object reference not set to an instance of an object" Error menus repeating many times as I move the mouse over the screen and am forced to close the application.

              Are you able to replicate this behavior?

              Comment


                Hello dtl-saw,

                I hadn't realized these wpf modification in State.DataLoaded doesn't play nice with duplicating tabs. I've moved to State.Historical which appears to be late enough for the ChartControl to be ready.

                Thanks for reporting the behavior. I've updated the script.
                Hello All, Moving forward this will be maintained in the help guide reference samples and no longer maintained on the forum. Creating Chart WPF (UI) Modifications from an Indicator - https://ninjatrader.com/support/help...ui)-modifi.htm (https://ninjatrader.com/support/helpGuides/nt8/creating-chart-wpf-(ui)-modifi.htm) I've
                Chelsea B.NinjaTrader Customer Service

                Comment


                  Hi Chelsea B.
                  I downloaded and imported the new file and repeated the steps I described from before and the Error window still appears requiring closing down the app.
                  I verified the timestamp on the download is from your 9/28 edits.
                  Can you double check that you attached the file that fixed the problem.
                  thanks

                  Comment


                    Hi Chelsea,

                    I like this WPF indicator very much - it helps us big time.

                    Is it possible to change the color on that NT8 Bar title label when clicking on either submenu1 (green) or submenu2 (red)?

                    Many thanks.

                    References:
                    https://ninjatrader.com/support/foru...considerations

                    Comment


                      Hello dtl-saw,

                      I had to take a deeper look which took a long time. I think its fixed.
                      The ChartControl appears to be null when closing the tab.

                      Please redownload and test.


                      nothingbutprofits,

                      What can you screenshot and draw a box around what you are referring to as the 'NT8 Bar title label'?

                      Are you referring to where it says 'Chart' on the upper left of the chart?
                      Last edited by NinjaTrader_ChelseaB; 10-05-2021, 04:49 PM.
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        Hi Chelsea B.
                        My initial testing confirms that you've fixed the problem.
                        I appreciate your work especially with this WPF script.
                        Thanks

                        Comment


                          Hi
                          Thanks for the sample file. It helped a lot. I separated Case 5 into a new indicator. Removed the bottom button row and made 5 duplicates of the top row of custom buttons. But I am having an issue. When I have multiple tabs open in a chart window and run indicator in all of them, then reload ninjascript in one tab, all custom buttons disappear except the last row in the other tabs. I can't find the problem behind this. Need help.
                          Attached Files

                          Comment


                            Hello fawzanalim,

                            Is this behavior occurring with the original example?
                            Chelsea B.NinjaTrader Customer Service

                            Comment


                              No, the problem does not occur with the original sample code.
                              Firstly i separated case 5, the problem does not occur in this step. It occurs with the 12 buttons that I have attached previously. It removes top 10 buttons.

                              Comment


                                Hello fawzanalim,

                                What specific line of code when added reproduces the behavior and when removed the behavior can no longer be reproduced?

                                Are you adding and removing rows in relation to the ChartControl?

                                Are you getting errors in the Log tab of the Control Center when the behavior occurs?
                                Chelsea B.NinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by gentlebenthebear, Today, 01:30 AM
                                2 responses
                                13 views
                                0 likes
                                Last Post gentlebenthebear  
                                Started by Kaledus, Today, 01:29 PM
                                2 responses
                                7 views
                                0 likes
                                Last Post Kaledus
                                by Kaledus
                                 
                                Started by frankthearm, Yesterday, 09:08 AM
                                13 responses
                                45 views
                                0 likes
                                Last Post frankthearm  
                                Started by PaulMohn, Today, 12:36 PM
                                2 responses
                                16 views
                                0 likes
                                Last Post PaulMohn  
                                Started by Conceptzx, 10-11-2022, 06:38 AM
                                2 responses
                                55 views
                                0 likes
                                Last Post PhillT
                                by PhillT
                                 
                                Working...
                                X