• 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

Building Custom form in NT8

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

    Building Custom form in NT8

    Ok. I am trying to move my forms from NT7 to NT8. I initial created my form in Visual Studio and copied the Design code to NT7. Works great. I am trying to move this same code to NT 8 and I get errors. What do I need to do to get something such as below working in NT8.



    Thanks.





    private void InitializeComponent()
    {
    this.AddZone = new System.Windows.Forms.Button();
    this.Sdate = new System.Windows.Forms.TextBox();
    // this.Stime = new System.Windows.Forms.TextBox();
    this.Shigh = new System.Windows.Forms.TextBox();
    this.Slow = new System.Windows.Forms.TextBox();
    this.label1 = new System.Windows.Forms.Label();
    this.label2 = new System.Windows.Forms.Label();
    this.label3 = new System.Windows.Forms.Label();
    this.label4 = new System.Windows.Forms.Label();
    this.label5 = new System.Windows.Forms.Label();
    this.SRC = new System.Windows.Forms.ComboBox();
    this.label6 = new System.Windows.Forms.Label();
    this.Scancel = new System.Windows.Forms.Button();
    this.STimeFrame = new System.Windows.Forms.ComboBox();
    this.Srefresh = new System.Windows.Forms.Button();
    this.Sdelete = new System.Windows.Forms.Button();
    this.SuspendLayout();


    .........

    #2
    Hello richa61416,

    NinjaTrader 8 is WPF (Windows Presentation Foundation) and is not Winforms as NinjaTrader 7 was.

    You will need to use WPF controls.

    Below is a public link to the microsoft website on System.Windows.Controls.
    https://docs.microsoft.com/en-us/dot...ramework-4.7.2
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks.OK. I have looked at it and spent about and hour and a half going through the forum. Looking at https://ninjatrader.com/support/foru...519#post508519
      and also the sample add on Ninjatrader help. All I want is to have a simple Text Box with Buttons that appear when I double click the form to accept my input. If NT7 has another 5 Years of life I can ignore converting my indicators. If not I need a sample that simply Create a Textbox on a form for Input using NT8. Do you have any sample scripts created by someone else that has already done this? Given my luck I would probably figure it out and then have my NT8 Crash due to something I miss.

      Comment


        #4
        I have found your example for placing buttons on the side panel.
        https://ninjatrader.com/support/foru...327#post499327



        However Placing a Textbox on that Panel when I type changes the symbol/instrument for the chart.
        2 options. 1. Can I get this not to change the instrument if the text box has the focus?
        2. Do you have an example using a floating Form with Buttons and Textbox?


        Thanks.

        Comment


          #5
          Hello richa61416,

          Below is a link to an example of preventing the overlay selector from appearing when using a text box thats added to the UI elements of a chart.

          https://ninjatrader.com/support/foru...688#post505688


          As well as an example of opening a new Addon window to enter information and return this to an indicator.
          https://ninjatrader.com/support/foru...686#post492686
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NinjaCustomer, Today, 10:06 AM
          3 responses
          7 views
          0 likes
          Last Post NinjaTrader_JoshG  
          Started by crabman777, Today, 09:52 AM
          4 responses
          16 views
          0 likes
          Last Post crabman777  
          Started by Arkadiy_B, Today, 06:43 AM
          0 responses
          4 views
          0 likes
          Last Post Arkadiy_B  
          Started by leontancfa, Today, 06:09 AM
          1 response
          17 views
          0 likes
          Last Post NinjaTrader_PatrickG  
          Started by soulfx, 12-01-2017, 08:44 AM
          3 responses
          1,023 views
          0 likes
          Last Post NinjaTrader_EricB  
          Working...
          X