Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Loading indicator from xml

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

    Loading indicator from xml

    Hello

    How can I create indicator from xml?
    I tried like this but indicator has default values.
    Previously I've saved indicator template to file with fileName.

    Code:
                XmlSerializer serializer = new XmlSerializer(typeof(StrategyFootprintIndicator));
    
    ​            System.IO.FileStream fs = new System.IO.FileStream(fileName, System.IO.FileMode.Open);
                FootprintIndicator = (StrategyFootprintIndicator)serializer.Deserialize(fs);
                fs.Close();
    
                FootprintIndicator.InitializeOnXmlLoading(this);
    ​

    #2
    Hello ren37,

    Indicators are automatically saved to xml (workspaces and templates) and any properly serialized properties will be saved.


    Attempting to serialize this yourself would be outside of what NinjaTrader support is able to assist with.

    Attempting to generate an instance of an indicator without calling the indicator method would be outside of what NinjaTrader support is able to assist with.

    This thread will remain open for any community members that would like to provide direction.

    You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    556 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X