NexusFi: Find Your Edge


Home Menu

 





Code to programatically save and load indicator properties (templates) in NT8


Discussion in NinjaTrader

Updated
    1. trending_up 802 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

Code to programatically save and load indicator properties (templates) in NT8

  #1 (permalink)
 b16aln 
London
 
Experience: None
Platform: ninjatrader
Trading: ftse100
Posts: 67 since Sep 2017
Thanks Given: 11
Thanks Received: 23

Hello,

As the title suggests I am looking for some code that I can use in my indicator to save and load the indicator properties to external xml files. As is generally my experience with nt8 support, they were unhelpful and refused to share the code to do this (https://forum.ninjatrader.com/forum/ninjatrader-8/indicator-development/1218493-code-to-save-and-load-indicator-templates)...so I am reaching out for some guidance here as I have no experience of xml and how to get it into the nt8 format. Loading and saving templates seems like such a common requirement that there must be many users that have already worked out and implemented this so hoping someone can share the code before I have to go balls deep into researching/implementing it.

I searched high and low and found this thread relating to nt7: . I don;t really understand what is going on with this example or how to translate it to nt8 but it seems to be generally what I am looking for.

If anyone can help it would be much appreciated.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Exit Strategy
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
26 thanks
Just another trading journal: PA, Wyckoff & Trends
21 thanks
My NQ Trading Journal
19 thanks
Tao te Trade: way of the WLD
16 thanks
HumbleTraders next chapter
9 thanks
  #2 (permalink)
 
trendisyourfriend's Avatar
 trendisyourfriend 
Quebec Canada
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG
Trading: ES, NQ, YM
Frequency: Daily
Duration: Minutes
Posts: 4,527 since Oct 2009
Thanks Given: 4,174
Thanks Received: 6,019


b16aln View Post
Hello,

As the title suggests I am looking for some code that I can use in my indicator to save and load the indicator properties to external xml files. As is generally my experience with nt8 support, they were unhelpful and refused to share the code to do this (https://forum.ninjatrader.com/forum/ninjatrader-8/indicator-development/1218493-code-to-save-and-load-indicator-templates)...so I am reaching out for some guidance here as I have no experience of xml and how to get it into the nt8 format. Loading and saving templates seems like such a common requirement that there must be many users that have already worked out and implemented this so hoping someone can share the code before I have to go balls deep into researching/implementing it.

I searched high and low and found this thread relating to nt7: . I don;t really understand what is going on with this example or how to translate it to nt8 but it seems to be generally what I am looking for.

If anyone can help it would be much appreciated.

I have created a routine to read an XML file in my strategy. I used it to read the current ATM template selected in the Chart Trader.

Here is an example i have done for you (took it from my strategy).
https://pastecode.io/s/23zsmphb

Don't forget to add these lines at the top of your script:
using System.Xml.Serialization;
using System.Xml;

Reply With Quote
Thanked by:
  #3 (permalink)
 b16aln 
London
 
Experience: None
Platform: ninjatrader
Trading: ftse100
Posts: 67 since Sep 2017
Thanks Given: 11
Thanks Received: 23


Thank you my friend! That's excellent and very good of you to help me out. I'll go over it properly on Monday and try to implement it next week. Thanks agin

Started this thread Reply With Quote
Thanked by:




Last Updated on October 8, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts