Hi, I'm developing an intraday strategy that utilizes the Tag property of a Position object, but once the Position is split by selling a partial quantity (I'm setting t.Quantity to smaller size immediately after the PlaceTrade call to sell), the newly created split position doesn't seem to carry the object I have in the Tag property of the original (full size) Position. Is that expected, or is it a defect? Or perhaps I need to do some additional coding to make sure that Tag object from the original Position will end up in the split Position?
Just for additional context, the object that I'm assigning to the Tag property is a List of instantiated ExitInfo objects I created to hold a bunch of exit parameters related to the trade - see the class definition below. The concept is once a trade is executed, the Tag property will carry a list of all planned exits for that position. A List<ExitInfo>() {exitA, exitB, exitC}; is being created and then assigned to the Tag property of the Transaction instance that opened a new position (which WL8 then assigns to the Tag property of the Position instance created).
Everything works perfectly until the point of a Position being split, in which case a reference to that Tag property ends up in a "Object reference not set to an instance of an object." error.

Thanks in advance for any insights!
Just for additional context, the object that I'm assigning to the Tag property is a List of instantiated ExitInfo objects I created to hold a bunch of exit parameters related to the trade - see the class definition below. The concept is once a trade is executed, the Tag property will carry a list of all planned exits for that position. A List<ExitInfo>() {exitA, exitB, exitC}; is being created and then assigned to the Tag property of the Transaction instance that opened a new position (which WL8 then assigns to the Tag property of the Position instance created).
Everything works perfectly until the point of a Position being split, in which case a reference to that Tag property ends up in a "Object reference not set to an instance of an object." error.
Thanks in advance for any insights!
Rename
I made a change so the Tag will get copied into the split position for Build 123.
Ok, great! Thanks for the quick response and action, I appreciate it!
Hi Glitch, just checking in about Build 123... do you have an estimate on when it will be ready and published? Thanks!
Your Response
Post
Edit Post
Login is required