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

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.
    Provides classes to create elements, known as controls, that enable a user to interact with an application. The control classes are at the core of the user's experience with any application because they allow a user to view, select, or enter data or other information.
    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.
        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




        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.




          As well as an example of opening a new Addon window to enter information and return this to an indicator.
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by RubenCazorla, Today, 09:07 AM
          1 response
          5 views
          0 likes
          Last Post RubenCazorla  
          Started by Irukandji, Today, 09:34 AM
          0 responses
          3 views
          0 likes
          Last Post Irukandji  
          Started by TraderBCL, Today, 04:38 AM
          3 responses
          25 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by WeyldFalcon, 08-07-2020, 06:13 AM
          11 responses
          1,423 views
          0 likes
          Last Post jculp
          by jculp
           
          Started by BarzTrading, Today, 07:25 AM
          2 responses
          29 views
          1 like
          Last Post BarzTrading  
          Working...
          X