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

Slider panel like chart Trader

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

    Slider panel like chart Trader

    Hi,
    I want to add a slider panel like chartTrader, to slide out with a button click. What will be the best way forward. It will have slide out and slide back like normal charttrader operation on a chart. any advice will be appreciated.

    #2
    Hello asmmbillah,

    The chart trader uses the WPF Visibility state for this of collapsed hidden or visible: https://docs.microsoft.com/en-us/dot...tframework-4.5

    Whatever WPF control you create could also do a similar task to hide its self. The ChartTrader doesn't specifically have any kind of animations so sliding or anything like that would be a custom WPF solution. You can find some example of WPF development in the following post:
    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


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks for your reply. I am trying to use window for the attached example I found in this forum to show, at the top left corner of a chart window. But for some reason it showing in different locations and different monitors. Can you advise, how I can use the visibility state for a wpf created window for NT8 to be visible and hidden state for a chart where the indicator is attached. file attached.
      Attached Files

      Comment


        #4
        Hello asmmbillah,

        A "Window" would be controlled by minimizing it hiding it, or you can close it and show it again later.

        As you are working with WPF windows and not NinjaScript here you can learn about these concepts in C# education tutorials or by searching online. You could search for "control WPF window location" as one example. The Top and Left properties can be used to set exact positioning for the window, you can also review the WindowStartupLocation property.

        The visibility state would generally be used for wpf controls inside your window to hide or show them.


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

        JesseNinjaTrader Customer Service

        Comment


          #5
          thanks for your reply, wpf did not go anywhere. Trying to use below within ninjascript

          NTWindow window = new NTWindow()
          {
          Height = 300,
          Width = 200,
          Topmost = true,
          WindowStartupLocation = WindowStartupLocation.CenterScreen,
          Caption = "parameter test"
          };
          but it is coming in the centre of the chart window. any idea about how to take it top left corner of that chart window showing with a rectangle in screenshot.

          Comment


            #6
            Hello asmmbillah,

            Are you trying to draw a rectangle in the chart window or make your own window?

            A custom window is not a control you can add to another window so the position you have shown would not be valid for an external window. If you mean to make a panel inside the existing window you need to use a WPF control and place it in either the existing window or on the UserControlCollection. The closest you could come to finding the position you have shown would be the existing windows Top and Left properties, or its general location.



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

            Comment


              #7
              Thanks, I am not trying to draw a rectangle or make my own window. I am trying to get the indicator property ie, parameter, settings etc.

              Comment


                #8
                Hello asmmbillah,

                I am not sure what you mean in contrast to the previous information. Could you provide more detail about what you are trying to accomplish?


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

                Comment


                  #9
                  Thanks for your reply. Since my last but previous post, I have tried different options, but could not achieve what I am looking for. Now on my last post, I mentioned that I am trying to get indicator properties like the screenshot attached. I want to keep the OK, cancel and Apply button as well. Thanks in advance.

                  Comment


                    #10
                    Hello asmmbillah,

                    If you are trying to access the properties of your indicator you can just use the instance of it that you have:

                    Code:
                    SMA mySma = SMA(12); 
                    Print(mySma.Period);
                    The properties window that you have shown is not something which would otherwise be something that you can add. That uses the WPF property grid to display an instance of the indicator however even if you were to use that control to display the indicator you would not be able to change its values dynamically.

                    If you mean to make some kind of quick access to change properties you can either define custom buttons to increment/change properties in your indicator for future calculations, this would not affect any historical data. Or you can just use the existing properties menu to actually update the property. Using the menu invokes the reload on the indicator which would be necessary if any properties were to change so the historical is recalculated.



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

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by RubenCazorla, Today, 09:07 AM
                    0 responses
                    1 view
                    0 likes
                    Last Post RubenCazorla  
                    Started by BarzTrading, Today, 07:25 AM
                    2 responses
                    28 views
                    1 like
                    Last Post BarzTrading  
                    Started by devatechnologies, 04-14-2024, 02:58 PM
                    3 responses
                    20 views
                    0 likes
                    Last Post NinjaTrader_BrandonH  
                    Started by tkaboris, Today, 08:01 AM
                    0 responses
                    6 views
                    0 likes
                    Last Post tkaboris  
                    Started by EB Worx, 04-04-2023, 02:34 AM
                    7 responses
                    165 views
                    0 likes
                    Last Post VFI26
                    by VFI26
                     
                    Working...
                    X