# Can't close postions "Not currently long..."

**URL:** <https://forums.collective2.com/t/cant-close-postions-not-currently-long/1108>\
**Category:** C2 Software Development\
**Created:** [June 13, 2011, 5:18am UTC](https://forums.collective2.com/t/cant-close-postions-not-currently-long/1108 "2011-06-13T05:18:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaa\_bbb3](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@aaa\_bbb3](https://forums.collective2.com/u/aaa_bbb3)\
**Post date:** [June 13, 2011, 5:18am UTC](https://forums.collective2.com/t/cant-close-postions-not-currently-long/1108/1 "2011-06-13T05:18:34Z")

</div>

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=stock&action=BTO&quant=10&symbol=IBM&duration=DAY](http://www.collective2.com/cgi-perl/signal.mpl?cmd=signal&systemid=62391030&pw=12345!&instrument=stock&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=stock&action=STC&quant=10&symbol=IBM&duration=DAY](http://www.collective2.com/cgi-perl/signal.mpl?cmd=signal&systemid=62391030&pw=12345!&instrument=stock&action=STC&quant=10&symbol=IBM&duration=DAY)  
  
  
  
What do i wrong here ?  
  
  
  
Please help me out.  
  
  
  
Best regards  
  
  
  
joy

---

<div class="post-metadata">

**Author:** ![MatthewKlein](https://yyz2.discourse-cdn.com/flex028/user_avatar/forums.collective2.com/matthewklein/32/21382_2.png) [@MatthewKlein](https://forums.collective2.com/u/MatthewKlein)\
**Post date:** [June 13, 2011, 7:53am UTC](https://forums.collective2.com/t/cant-close-postions-not-currently-long/1108/2 "2011-06-13T07:53:46Z")

</div>

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.”

---

<div class="post-metadata">

**Author:** ![aaa\_bbb3](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@aaa\_bbb3](https://forums.collective2.com/u/aaa_bbb3)\
**Post date:** [June 13, 2011, 9:29am UTC](https://forums.collective2.com/t/cant-close-postions-not-currently-long/1108/3 "2011-06-13T09:29:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MatthewKlein](https://yyz2.discourse-cdn.com/flex028/user_avatar/forums.collective2.com/matthewklein/32/21382_2.png) [@MatthewKlein](https://forums.collective2.com/u/MatthewKlein)\
**Post date:** [June 13, 2011, 10:19am UTC](https://forums.collective2.com/t/cant-close-postions-not-currently-long/1108/4 "2011-06-13T10:19:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aaa\_bbb3](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@aaa\_bbb3](https://forums.collective2.com/u/aaa_bbb3)\
**Post date:** [June 13, 2011, 10:29am UTC](https://forums.collective2.com/t/cant-close-postions-not-currently-long/1108/5 "2011-06-13T10:29:55Z")

</div>

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