Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Changing Drawing Templates but the Hard Way

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

    Changing Drawing Templates but the Hard Way

    Hello,

    At this point I'm well into the development of making an on the fly template switcher/changer. While retrieving the various properties from the XML templates, I noticed a few additional properties that I want to make sure don't need to be set. Down below in pink are the properties that are being retrieved. How about the ones that have a ? beside them?

    Click image for larger version

Name:	E4RnVAG.png
Views:	399
Size:	78.5 KB
ID:	1128117

    With the eclipse itself, it seems that I got all the correct properties that would be saved in a template. There is the Visible property however that does not appear to be a property that is inherited by the ellipse. I imagine the Visible property is handled by the chart and not the individual object themselves. OH wait, I stand corrected. It's under IsVisible. Well just the same, is there any other property that should be set?

    Click image for larger version

Name:	jyvvd0v.png
Views:	368
Size:	34.1 KB
ID:	1128118

    Thanks
    Unsuitable
    NinjaTrader Ecosystem Vendor - Ocean Trading Indicators

    #2
    I stand corrected once again. There is an IsVisible property however, that does not seem to be a property that is stored in the XML template file.
    Unsuitable
    NinjaTrader Ecosystem Vendor - Ocean Trading Indicators

    Comment


      #3
      Hello Unsuitable,

      Working directly with xml is not something which we could outline what needs to be set and does not, the serialization happens for all public properties on a class. Public properties can be used logically in saving and loading so we wouldn't have the whole picture of whats actually being used by looking at just the xml. I would say that if you see a property in the file, it needs created because you otherwise won't know if its actually going to work in all areas where the platform may use that object. This is also an area which would be prone to failure, there is no expectation for you to be using the file in this way so if something is renamed/changed/removed later its not going to be in the change log and you will have to figure it out.

      The IsVisible property is one that is used in runtime, I am not aware if this would be saved in the workspace or if something is is being used logically to save the value.



      I look forward to being of further assistance.

      Comment


        #4
        Hello Jesse,

        Yeah, I realize this is a rather custom functionality and could mess up. For example, the folder doesn't exist, the XML file not formatted correctly, etc. However, I've acounted for that. Keep in mind I'm only retrieving a chart object's appearance, not location (which templates store for some reason) and such. Of course, the XML property names are prone to change without notice. For now, it's a solution until applying a new template to an existing chart object becomes possible.

        Catch ya later in some post in the future!
        Unsuitable
        NinjaTrader Ecosystem Vendor - Ocean Trading Indicators

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        590 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        342 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        555 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X