Find System by Name

Wait


 

Forum: C2 Software Development

New?Last PostPosted By#Subject
4/23/13 (23:09)Matthew Klein3Reversing a Position Using Tradestation
4/03/13 (22:23)Greg Hanowski3sync suggestion
3/14/13 (8:34)Matthew Klein2ordertypes
3/11/13 (17:01)Greg Hanowski1super slow getsystemroster
2/27/13 (19:22)Matthew Klein5orders accepted and then cancelled by the system
2/25/13 (10:33)Greg Hanowski4scaledQuant confusion
2/20/13 (12:20)Greg Hanowski3session timeout
 
Older subjects >>



Post new message

 
Subject:Can't close postions "Not currently long..."
Posted by:aaa bbb ( C2 Score: 221)  New msg
 
Ignore user's posts for week month forever
When:6/13/11 (5:18) 
Systems:
 
Hi, admin

I have created a new sytem and I tested position open and close action.
position opening is working well.
But position closing action does not work properly even if i have a long position.
I got the error message like this.

<collective2>
<status>error</status>
<ack></ack>
<errortype>Can't enter STC - Not currently long</errortype>
<comment><![CDATA[You can't enter an order to Sell To Close (STC) because you do not have a long position in IBM.
If you want to enter a STC, make it conditional on a not-yet-executed STO order. C2CONDITIONALLINK]]></comment>
</collective2>


Fyi, this is my test link. password and system id are correct.
1.BTO:
http://www.collective2.com/cgi-perl/signal.mpl?cmd=signal&systemid=62391030&pw=12345!&instrument=sto ck&action=BTO&quant=10&symbol=IBM&duration=DAY
2.STC:
http://www.collective2.com/cgi-perl/signal.mpl?cmd=signal&systemid=62391030&pw=12345!&instrument=sto ck&action=STC&quant=10&symbol=IBM&duration=DAY

What do i wrong here ?

Please help me out.

Best regards

joy
  
 
Subject:Can't close postions "Not currently long..."
Posted by:Matthew Klein (Admin)  New msg
When:6/13/11 (7:53) 
 

In response to post by aaa bbb of 6/13/11 (5:18)

Hi, admin

I have created a new sytem and I tested position open and close action.
position opening is working well....

See entire

Joy:

You are not currently long.

You have a Buy To open (BTO) order working at the time I write this (and the time you tried to submit a STC), but you do not at this moment have a long position. Thus an order to Sell To Close at market can't be submitted.

If you want to enter an order to Sell To Close (that is, an order to close your long position) before the markets are open, and before your first order to open the long is executed, then you must make your Sell To Close order conditional upon the first Buy To Open. In other words, you need to say, "When the first Buy order is executed, then please make this order start working."
  
 
Subject:Can't close postions "Not currently long..."
Posted by:aaa bbb ( C2 Score: 221)  New msg
 
Ignore user's posts for week month forever
When:6/13/11 (9:29) 
Systems:
 

In response to post by Matthew Klein of 6/13/11 (7:53)

Joy:

You are not currently long.

You have a Buy To open (BTO) order working at the time I write this (and the time you tried to submit a STC), but you do not at this moment have a long position. Thus an order to Sell To Close at market can't be submitted....

See entire

Thank you for your reply.
I have a question now.
Can you please explain more clearly about this?
"you must make your Sell To Close order conditional upon the first Buy To Open"
I have no idea what does it means. sorry

Best regards
  
 
Subject:Can't close postions "Not currently long..."
Posted by:Matthew Klein (Admin)  New msg
When:6/13/11 (10:19) 
 

In response to post by aaa bbb of 6/13/11 (9:29)

Thank you for your reply.
I have a question now.
Can you please explain more clearly about this?
"you must make your Sell To Close order conditional upon the first Buy To Open" ...

See entire

If you are using the API, you can learn the technical specs for specifying conditional orders in the API docs.

For a more general education about what we mean by "conditional orders" (essentially, orders that do not start "working" until after another, specific order is filled), you can see a fabulous video, featuring my melodious voice, by going to the Order Entry screen, and clicking Order Entry Help at the bottom of the order entry ticket. Then select the video about "conditional orders."

Main summary: You need to tell C2 that your closing order is "conditional on" the opening order being filled. It's usually as simple as specifying a
&conditionalupon=xxx

parameter.

These are not needed in cases where you use the "all in one" order entry command specifying both the entry and the exits in one API command.

Matthew
  
 
Subject:Can't close postions "Not currently long..."
Posted by:aaa bbb ( C2 Score: 221)  New msg
 
Ignore user's posts for week month forever
When:6/13/11 (10:29) 
Systems:
 

In response to post by Matthew Klein of 6/13/11 (10:19)

If you are using the API, you can learn the technical specs for specifying conditional orders in the API docs.

...

See entire

Thanks
Actually I have skipped description for conditional order.
Now I understood what is conditional order.

Regards
  
Back up to list of subjects