Determining if signal has been effectively closed

I am trying to see if there is a way to determine if a TC order has impacted a given signal such that the position created by it is closed. For example, if I call signalstatus I can see if the given order is placed - is there a good method to see if the position created by that signal has been closed (through a corresponding to-close order)?

Let me try to make sure I understand your question before answering it.



For any given signalid, you want to be able to know quickly and easily if the tradeid associated with that signalid is completely flat in the C2 Model account? Is this right?



Also, a bit of clarification, please: You mentioned in your post that you care specifically about "to close" (TC) signals. Is this really the case? Or do you want some sort of universal algorithm that spits back a true/false (is the trade group associated with this signal fully closed) given a specific signal id - regardless of whether that signal id is TC or TO (to close or to open).



Remember finally as you think about both your answer to me and your programming project that a signalid might be part of a longer more complex trade group. That is, a specific tradeid might group together a long series of opening and closing signals, and there might be many opening signals and many closing signals.



So do you want to know if the signalid in question was responsible for flattening a long sequence of trades? Or do you want to know if the signalid in question is part of a long sequence of trades that subsequently has been flattened. These are slightly different answers.