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 Walter2011, Today, 08:27 AM
          1 response
          4 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Started by arangocj, Today, 06:28 AM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by BIllblast, Today, 08:03 AM
          3 responses
          11 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Started by jerryblack, Yesterday, 05:04 PM
          3 responses
          16 views
          0 likes
          Last Post NinjaTrader_PaulH  
          Started by mattage86, Today, 06:43 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_RyanS  
          Working...
          X