appreciate so much in advance and thanks a lot
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!
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
NinjaTrader
Error generating xml document
Collapse
X
-
Error generating xml document
hello , please can anybody help me to resolve the issiue of this indicator to generate the XLM file to be able to save a defaulte template , i find this indicator in the shared user files and it want be saved in chart template , everytime i have to add it again to the chart ,
appreciate so much in advance and thanks a lotTags: None
-
Hello deviltrader,
The error you are getting is because the indicator can't be serialized in the workspace which means saved. Public properties need to be able to be saved as a string so items like Brushes cant be saved. I see that you have a brush serializer property but you didn't add [XmlIgnore] to your brush property, that would be one reason why that error happens.
ZigZagColor needs [XmlIgnore]
You also have some public variables which could be made private, these don't need saved with the workspace because they are not a User Input.
public int dir; // direction of current zigzag trend, 1=up, -1=down
public int lasthibar; // bar number of last swing high (bars ago = CurrentBar-lasthibar)
public int lastlobar; // bar number of last swing low
public double lasthi; // value of last swing high
public double lastlo; // value of last swing low
JesseNinjaTrader Customer Service
- Likes 1
-
Originally posted by NinjaTrader_Jesse View PostHello deviltrader,
The error you are getting is because the indicator can't be serialized in the workspace which means saved. Public properties need to be able to be saved as a string so items like Brushes cant be saved. I see that you have a brush serializer property but you didn't add [XmlIgnore] to your brush property, that would be one reason why that error happens.
ZigZagColor needs [XmlIgnore]
You also have some public variables which could be made private, these don't need saved with the workspace because they are not a User Input.
public int dir; // direction of current zigzag trend, 1=up, -1=down
public int lasthibar; // bar number of last swing high (bars ago = CurrentBar-lasthibar)
public int lastlobar; // bar number of last swing low
public double lasthi; // value of last swing high
public double lastlo; // value of last swing low
thank you for the explanation , the issiue was resolved by bltdavid
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rhyminkevin, Today, 04:58 PM
|
1 response
41 views
0 likes
|
Last Post
by Anfedport
Today, 05:11 PM
|
||
Started by iceman2018, Today, 05:07 PM
|
0 responses
5 views
0 likes
|
Last Post
by iceman2018
Today, 05:07 PM
|
||
Started by lightsun47, Today, 03:51 PM
|
0 responses
7 views
0 likes
|
Last Post
by lightsun47
Today, 03:51 PM
|
||
Started by 00nevest, Today, 02:27 PM
|
1 response
14 views
0 likes
|
Last Post
by 00nevest
Today, 03:48 PM
|
||
Started by futtrader, 04-21-2024, 01:50 AM
|
4 responses
49 views
0 likes
|
Last Post
by futtrader
Today, 03:01 PM
|
Comment