API Support Forum
OEC API > New Feature Requests > Close by ticket #
Author Topic: Close by ticket #
(12 messages, Page 1 of 1)
Moderators: VPfau
PArnoldson
Posts: 154
Joined: Oct 03, 2007


Posted: Sep 08, 2008 @ 03:28 PM             Msg. 1 of 12
I would like the ability to close orders by the ticket #. I current know that you do FIFO when closing orders, but I would like the ablity to close an order out of order. so calling the api closeorder(ticket#) would be great and close out the order passed in.
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Sep 08, 2008 @ 03:38 PM             Msg. 2 of 12
I do not fully understand your request.

Open positions could be closed, orders could be cancelled, but you can't close an order or cancel a position.

To close an open position, you need to send a market order with opposing side. Position price is calculated by the average price of fills, not by FIFO rule.

To cancel a working order, just call the CancelOrder method.
PArnoldson
Posts: 154
Joined: Oct 03, 2007


Posted: Sep 08, 2008 @ 04:36 PM             Msg. 3 of 12
I am simply requesting that there is a method for closing an open order by ticket number. I understand the cancel working orders and this doesn't pertain to them. I would like more information on how you close your orders then.

To close an open position, you need to send a market order with opposing side. Position price is calculated by the average price of fills, not by FIFO rule.

see topic : http://www.openecry.com/cfbb/index.cfm?page=topic&topicID=191

Let me give you an example: I buy 1 @ 2.00 then buy another @ 2.50 a little bit later. I would like to "close" "offset" the second fill. after that the 1 @ 2.00 would still be there.
Edited by PArnoldson on Sep 8, 2008 at 04:41 PM
Edited by Administrator on May 3, 2010 at 13:43:50
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Sep 08, 2008 @ 04:43 PM             Msg. 4 of 12
after you make transactions above, you will have an open position of 2 @ 2.25, and when you sell 1, the remaining position will be 1@2.25.

There is no way to offset individual parts of a position.
Optisizer
Posts: 5
Joined: Dec 31, 2008


Posted: Dec 31, 2008 @ 04:16 PM             Msg. 5 of 12
Why?
There is no reason for why you shouldn't be able to let me view the entry and exit pairing according to what fits my needs the best, no matter whether you are actually executing FIFO or not...
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Dec 31, 2008 @ 04:25 PM             Msg. 6 of 12
Under our current average accounting method we store only position volume and average price, so there is no individual fills or parts of position stored.

When you partially offset the position, volume part of the position is changed, and average price remains, so no pairing is possible.
Optisizer
Posts: 5
Joined: Dec 31, 2008


Posted: Dec 31, 2008 @ 07:13 PM             Msg. 7 of 12
Well, then your average accounting method isn't particularly well suited to your clients' needs, so as this is a forum for "New feature requests" I ask you to work on changing that instead of just saying it isn't possible.
Optisizer
Posts: 5
Joined: Dec 31, 2008


Posted: Dec 31, 2008 @ 07:29 PM             Msg. 8 of 12
Besides that doesn't matter either. When all is said and done the outcome is still the same, so you could make this a feature that runs locally on the client end to help the client keep track of his individual trades.
On that theme I would also like the possibility to pass a comment with my trades, that also only needs to be stored locally, which would help me keep track of which strategy generated a particular trade and which of my exits that should correspond to it.
Seems pretty uncomplicated to me, no?
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Jan 02, 2009 @ 08:45 AM             Msg. 9 of 12
Unfortunately, we do not have this feature scheduled for development in the near future, so you have to implement it yourself for now.

It sounds very similar to the Order.Comments property - is there anything that prevents you from using it?
Optisizer
Posts: 5
Joined: Dec 31, 2008


Posted: Jan 03, 2009 @ 11:41 AM             Msg. 10 of 12
> Unfortunately, we do not have this feature scheduled for development in the near future, so you have to implement it yourself for now.

Ehhh, ok. But how do you suggest I do that? I am a trader and market researcher not a computer programmer.

> It sounds very similar to the Order.Comments property - is there anything that prevents you from using it?

No, but from what I can tell it doesn't do me any good, for two reasons, with both reasons rendering each other mutually moot.

1) I can't tailor it's content. I trade some 20 markets, with at least two strategies each, using primarily OSO orders, with the second O being an individually managed trailing stop to the entry order. This can make for +100 working and held orders. It says OSO in the comments column for all of them, and as far as I can tell I can't change that.

2) Once an entry order is executed into an open position and "moves" to the open position window there is no comment possibility at all. The original entry order has lost the connection it originally had to the attached OSO trailing stop.

With some 100 orders and with a need to keep track not only of the P/L for the markets but also for the P/L for the strategies and all market-strategy combos this quickly becomes rather messy with a HUGE INCREASED risk for human errors, and about two extra hours in back-office work a day, in the administration of it all.

The main point is that it is paramount for a larger-scale, multi-strategy trader to keep track of both ends (entry and exit) of his trades as one unit. Connecting trades via order number (the original request in this thread) would be one way to approach that and simplify the daily activities for the trader, a better way would be to allow the trader to pass some kind of flag/comment/remark of his own choosing.

This seems to me a very rudimentary thing that all traders could benefit from and demand and it boggles my mind there is no e-trading software providing it. That said I use OEC because it still has better OSO capabilities than for example PATS and TT. Even so, take a look at, for example, the FXCM currency trading platform to see how they are connecting OSO orders for the entire life span of the trade. They too are lacking a "sticky" comments feature, but everything else is very intuitive and user friendly.

Thanks for reading this far,
/Thomas Stridsman
SergeK
-Developer-
Posts: 475
Joined: Jan 26, 2007


Posted: Jan 05, 2009 @ 08:56 AM             Msg. 11 of 12
Could you please confirm - are you having problems writing a custom trading application with OEC API, or looking for additional functionality in the OEC Trader application?

In the first case, you can program all additional logic needed in your code.

Otherwise, we have to admit we are not able to satisfy your needs in the OEC Trader App at this time.
Optisizer
Posts: 5
Joined: Dec 31, 2008


Posted: Jan 12, 2009 @ 09:55 AM             Msg. 12 of 12
I was just looking for additional functionality, just so that I wouldn't need to the custom API myself.
At this time I have built workarounds combining the Excel DDE and some basic Excel programming.
This leaves me with one small additional request however. That is:
Please add to the Excel DDE the possibility to pass order release and cancel times for orders executed via Excel, just as they are possible for most order types directly inside OEC.