Signal problems

How can I find out if a signal-ID is still valid (the stoploss could have closed the current position)?



Now I use this:

"http://www.collective2.com/cgi-perl/signal.mpl?cmd=signalstatus&signalid=" + CurrSignalIDC2 & "&pw=" + PassWordC2 + "&c2email=" + SystemEmailC2



If C2 closed my previous position (stoploss), I will get the information. Everything works well until the next step when my system generates a new signal. When I parse out <status> I get "error".

This only occure in the same reading cycle (C2 has closed my position and then a new signal generates). I think that maybe the link (see above) cause this problem…



To send my signal I use this (if long):

"http://www.collective2.com/cgi-perl/signal.mpl?cmd=signal&systemid=" + SystemIDC2 & "&pw=" + PassWordC2 + "&instrument=future&action=BTO&quant=" + QuantFuturesC2 + "&symbol=" + SymbolC2 + "&duration=GTC&stoploss=" + StopLongC2



If C2 closes my position (stoploss) and after a few minutes my system generates a new signal, I get NO error messages…



My second question, do I have to delay my signal upload after I check if the signal is valid?

No support???



A few more XML-example could be useful… You are only showing all examples one way…

Is the above link the right way to check if the trade is alive???



What would the response from C2 look like if C2 is buisy to process my request checking status and my system tries to place a new order??? Should I use a delay timer???



What help can I expect from C2, develop my signal interface, Is it try and error?

Mr. A:



Please forgive me. I wasn’t entirely sure I understood your question 100%. So before I lead you down a wrong path, let me ask for some clarification and make sure I understand what information you seek.



It sounds like you are delivering signals to C2, and then want to know if those signals result in executions and/or new positions. Is this the main thrust of what you are trying to do?



If so, have you considered using the C2 Data Services API ( http://www.collective2.com/C2DS.pdf ). In particular, look at the establishstatus and checkin commands.



Let me know if that is helpful. Or if I am misunderstanding your question or not answering it the right way, let me know that, too.



Matthew



I apologize if I sounded a bit harsh.

But I get frustrated when I can´t get any further…



Well, I will use and begin with the easy C2 Signal Entry API.



I use the "Requesting positionstatus" command, for checking the status for my trailing stoploss (I use the stoploss signal-ID when I request this command and the trailing is done by my system). I think I do this the right way when I parse out the <tradedwhen> from the xml-respons. If <tradedwhen> is zero I´m still in the game, else the system has been stoped out. Is this right so far???



The main problem is that I get errors from C2 in special occasions…

When the system first checking positionstatus and discover that I´ve been stoped out and then in the next moment (right away) gets a new signal (long or short) and tries to send this signal the error occurs…



I know that the problem could be my own dirty code or that C2 can not process my next request (the signal)… Should my system try to sleep through a waittime before the next request (the signal) or is there any command for check/test if C2 is ready for new requests.



I´m sorry if my English is not perfect and I hope you understand my problem.

If <tradedwhen> is zero I´m still in the game, else the system has been stoped out. Is this right so far???



Yes.



When … I discover that I´ve been stoped out and then in the next moment (right away) gets a new signal (long or short) and tries to send this signal the error occurs…



This is the part of your question I am not following. Are you saying that you receive notification from the C2 API that your stop loss has been filled, and so, immediately upon learning this, you submit a new order, but that order generates an error? If this is what you mean, please provide more detail. What kind of error do you get? Is it a well-formed XML error alerting you to some sort of error condition? Or is it an http error that you cannot connect to C2 servers for some reason.



The easiest thing is if you could post the actual query/response logs of a sequence so that I can understand the exact issue.