Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to add button on settings panel in ninjatrader 8?

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

    How to add button on settings panel in ninjatrader 8?

    Hey everyone,

    I'm currently trying to figure out a way on how to add a button on settings panel. I saw a post where they created a button but it's on the Chart Panel. Is there anyway I can create button on Settings Panel?

    #2
    hey itgoesbrrrrr,

    depends on what the button does I guess...
    ​​If it is a button that will change a property of the strategy, maybe the propertyAttribute page is what you want to check.
    NinjaTrader 8
    NinjaTrader 8.
    it does not add a button to the Analyzer but to the strategy properties. It is handy for a quick change of a value from there instead of from within the code.

    if you want a new button for the analyzer to do something new, it is totally beyond my skills.
    have a good one.
    Last edited by Amedeus; 12-23-2021, 11:46 AM.

    Comment


      #3
      Hello itgoesbrrrrrrr,

      Thank you for your note.

      You can create a Custom PropertyEditor A.K.A custom button editor. In an AddOn script you can define your custom property editor (note you'll need to restart the platform any time you make changes to this script for them to take effect).

      You can then use your custom property editor in a script to create a button that pops up a window.

      I'm attaching two example scripts that demonstrate; the AddOn and an indicator that uses the property editor we created in the AddOn.

      Please let us know if we may be of further assistance to you.
      Attached Files

      Comment


        #4
        Hey NinjaTrader_Kate,

        I tried using the AddOn script that you provided but in TestWPFWindowSelector.cs, it says I'm missing an assembly which is WpfPropertyGrid. Do you know how I can resolve this issue?
        Attached Files

        Comment


          #5
          Hello itgoesbrrrrrr,

          Thank you for your reply.


          The compile error you are seeing in the NinjaScript Editor indicates you are missing references to a .DLL file in your installation. Please follow the steps below to rectify the error.
          1. From the Control Center please select New--> NinjaScript Editor
          2. In the NinjaScript Editor please right click and select References.
          3. The Add option will open a File Explorer, go to your C drive > Program Files (x86) > NinjaTrader 8 > bin 64 folder and locate the .DLL System.Windows.Controls.WpfPropertyGrid
          4. If you find the .DLL please left click to select it and then select Open--> then select OK in the References window--> then right click in the NinjaScript Editor--> select Compile
          Once compiled successfully you should no longer get the error and be able to use the test provided previously.

          Please let us know if we may be of further assistance to you.

          Comment


            #6
            Hey NinjaTrader_Kate,

            I got the script working now but I don't see any changes like a button on Settings panel that I was expecting. Thank you for your help btw!
            Attached Files

            Comment


              #7
              Hello itgoesbrrrrrrrr,

              Thank you for your reply.

              The example script is an indicator and would not be usable in the Strategy Analyzer. You can look at the PropertyButtonTest indicator from the indicators window on a chart, and then look at the code to see how the button is created and how it pops up a window. You could then use the same concept in a strategy, and the button would show in the strategy analyzer properties section when that strategy is selected.

              Please let us know if we may be of further assistance to you.

              Comment


                #8
                Hey NinjaTrader_Kate,

                Your code works! Thanks a lot!

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                612 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                355 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                105 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                561 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                564 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X