• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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:
    https://ninjatrader.com/support/foru...ns?postcount=1

    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 polo0202, Today, 12:15 PM
                    1 response
                    7 views
                    0 likes
                    Last Post NinjaTrader_BrendanC  
                    Started by GARZONJ, Today, 11:27 AM
                    1 response
                    6 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Started by NtFan, Today, 11:08 AM
                    0 responses
                    6 views
                    0 likes
                    Last Post NtFan
                    by NtFan
                     
                    Started by anamaria0589, Today, 09:39 AM
                    1 response
                    13 views
                    0 likes
                    Last Post NinjaTrader_Jermaine  
                    Started by mcjosejavier, Today, 09:54 AM
                    1 response
                    11 views
                    0 likes
                    Last Post NinjaTrader_Heath  
                    Working...
                    X