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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
572 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
331 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
549 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
550 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment