appreciate so much in advance and thanks a lot
Announcement
Collapse
No announcement yet.
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
- 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 Mindset, 04-21-2026, 06:46 AM
|
0 responses
77 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
109 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
57 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
108 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
65 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment