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 highlight Chartpanel?

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

    How to highlight Chartpanel?

    Hello,

    I'm trying to create a script that tracks your cursor so that it highlights the chartpanel if your mouse is currently over.

    I've tried 2 different versions of this, each with their own sets of issues.

    I'm struggling with XAML, especially trying to set it up from code. If somebody could take a look at this test script and help figure out where I'm going wrong, it would be appreciated. Also, how would one go about removing the highlight once its been applied?


    Thanks!
    Attached Files

    #2
    Hello TG,

    I am not sure how much could be done with supported code, but I'll look into this and see what I can come up with.

    My initial thoughts are that there will be limitations from an indicator since the indicator will only own the panel it is added to. For instance, adding your first attempt to an additional panel will only give the effect on the price panel and on the indicators panel.

    I'll work on this as resources allow and let you know anything I can share to assist further.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi Jim,

      I just did the quick and easy version on an indicator just to get an idea of how its to be done, even if it effects just 1 panel in this case. Once I get a better understanding of how the XAML related code is to be done, I can just port the script over to an add-on afterwards.

      Comment


        #4
        Hello TG,

        I modified your first attempt to loop through all chart panels and apply the ControlTemplate to all ChartPanels in all open windows. All ChartPanels that you wish to apply the highlight to must be added before executing the loop.

        I've attached the example I was working on. You should be able to disable the behavior by applying the original ControlTemplate. Keep in mind, the added code to detect the Panel index will only work with one chart open, and it is not written to differentiate between different Charts.

        I should be clear that just about none of this is supported code, and I only took on the task as an exercise out of personal interest. Assistance with XAML and pure C# is not within our scope of NinjaScript support.
        Attached Files
        JimNinjaTrader Customer Service

        Comment


          #5
          Hi Jim,

          Thank you for taking the time to write up this script. Unfortunately, it still lands me with the same issue that I was having before. I apologize for not being clear about what I am trying to fix. What I am attempting to work out is the code for the actual highlighting itself, not the part about it finding all panels (I'm already working out an add-on for this). What the script currently is doing is that when a panel is highlighted, I cannot left click in it, but right click seems to work fine. This is where I am needing help, to be able to access the panel as usual while still having the highlight on.

          The end goal of this script is to make it easier to find my cursor over the multiple charts that I have open on multiple screens, especially because I also use global crosshair.

          Comment


            #6
            Hello TG,

            I should have noticed that earlier. I'll work on this later for completions sake, but for the time being you may wish to reference the article here: https://siderite.blogspot.com/2010/1...ltemplate.html

            If you figure this out before I do, please share your findings with me.
            JimNinjaTrader Customer Service

            Comment


              #7
              thanks for the link Jim, I'll check this out over the weekend

              Comment


                #8
                Hello TG,

                As per our discussions and challenges in cloning a sealed ControlTemplate and applying to all ChartPanels without an event handler, we have moved forward with a feature request.

                Ticket ID SFT-3080.

                Please keep in mind, feature requests are fulfilled based on the development team's priorities and we cannot offer an ETA or promise of fulfillment. Upon implementation, the ticket ID's can be seen in the Release Notes page of the help guide.

                Release Notes: https://ninjatrader.com/support/help...ease_notes.htm

                Please let us know if we can do anything else to assist you further.
                JimNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Javierw.ok, Today, 04:12 PM
                0 responses
                4 views
                0 likes
                Last Post Javierw.ok  
                Started by timmbbo, Today, 08:59 AM
                2 responses
                10 views
                0 likes
                Last Post bltdavid  
                Started by alifarahani, Today, 09:40 AM
                6 responses
                40 views
                0 likes
                Last Post alifarahani  
                Started by Waxavi, Today, 02:10 AM
                1 response
                18 views
                0 likes
                Last Post NinjaTrader_LuisH  
                Started by Kaledus, Today, 01:29 PM
                5 responses
                15 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X