It happens, when this is used in GUI
[PropertyEditor("NinjaTrader.Gui.Tools.CollectionEd itor")]
Problem:
when loading and aplying strategy template, it adds up items from template to existing values, which causes strange behavior, where count of values in collection doubles = there are the old values + new ones from template.
- I am not sure, what technically happens inside.
- I see, that initialy I have programatically set 2 values in collection (as initial state behind of the property), and after I load and apply strategy template, then I have 4 values in the collection = 2x the same values. I expect, that values coming from template were just added.
- Count of values does even higher, to 8, or 12, depending on how many interactions there are while playing in GUI
- I check the template XML - and there are only 2 values, not 4 = so template is OK.
Correct behaviour should be:
- remove all existing from collection - so it is empty first
- add there new items, that are in the template
NT8 version: 8.0.6.1
To help to reproduce the problem, I can send you whole Custom folder,
where it is reproducible each and every time.
(I am sorry, I cannot prepare minimalistic demo example, because I am very busy these days..).
See the pictures please - for demonstration:
Comment