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

Local properties v Global properties

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

    Local properties v Global properties

    Right, I am writing an indicator that tests for multiple criteria.

    The basic premise is a custom drawing tool that draws a box. When price enters the box a series of tests are applied, based upon what a user has selected from a list of available tests to test. The list f what to test is local properties and I have the answer for how to code this.

    Where I am stuck is that I want the user to be able to define a number of criteria for each of individual tests in the list of available tests. These criteria I want stored in a a global properties area eg (file -> new custom drawing tool properties) away from the chart and drawing tool itself. Placing the custom test criteria in a separate location is to prevent the local properties of the drawing tool itself becoming over populated with non helpful stuff. Otherwise making chart specific changes becomes confusing and slow. I have seen other Add-on tools use this approach and I would like to do this as well.

    So where I am stuck is locating the Ninja method that allows you to create new sections in the main file menu?

    As I also want to have the global settings saved, I am assuming I need to set up an xml write and read call so the User defined settings are sent to a custom external file.

    Thoughts greatly appreciated?

    Kind regards

    Duncan

    #2
    Hello Duncan,

    The sections are controlled by the GroupName parameter when using the Display attribute.


    You can use static classes to hold information globally, or you can read these from text file or from xml.
    Below is a link to an example that uses a static value.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello Duncan,

      The sections are controlled by the GroupName parameter when using the Display attribute.


      You can use static classes to hold information globally, or you can read these from text file or from xml.
      Below is a link to an example that uses a static value.
      http://ninjatrader.com/support/forum...980#post442980
      Thanks for the class idea. I am reading that thread and digesting the detail. The Display name attribute however is not what I am looking for. This simply creates a section within the properties UI of a specific object (the Properties I have termed local for the purposes of this discussion).

      What I am trying to do is create a new NT8 page from the file menu that is a page the user needs to navigate to to set global options for the custom drawing tool I am writing.

      Is there a class, script or coding example you can share where someone has done this?

      Kind regards

      Duncan

      Comment


        #4
        Hello Duncan,

        It sounds like you are describing an addon window with a custom property grid. Is this what you are looking for?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Chelsea that is what I was describing, I just did not know what it was called.

          Thanks for pointing me in the right direction. I'll look at the thread you have suggested and revert if I have further questions.

          Kind regards

          Duncan

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by bmartz, 03-12-2024, 06:12 AM
          5 responses
          32 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Started by Aviram Y, Today, 05:29 AM
          4 responses
          13 views
          0 likes
          Last Post Aviram Y  
          Started by algospoke, 04-17-2024, 06:40 PM
          3 responses
          28 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by gentlebenthebear, Today, 01:30 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by cls71, Today, 04:45 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X