OrderCloseBy Question

 

I've read several threads re: OrderCloseBy and I'm sorry to be thick about this but I still don't get it. And I have found the documentation to be no help beyond syntax.

- forex.com at least, does not allow "hedging", opposite positions for the same pair in the same account. If they see both, they close both. I've seen it happen real time. To you who are posting about OrderCloseBy, I don't understand how you can end up with opposite positions for the same pair in the first place.

Q: Can you please explain this? How do you get opposite positions in the same pair? At forex.com, they close both positions if you try to do this.

Q: Is there a time window or a relationship in how the orders are entered, that allows execution of OrderCloseBy for opposite position/same pair?

Q: Would I submit OrderSend for the new position followed immediately by OrderCloseBy, or how would this work?

i've been doing this manually by OrderClose then a market order OrderSend, but if OrderCloseBy really saves a spread, I would like to be able to use it.

Any information is appreciated.

Thanks!

 

No hedging is a US rule so you can probably have opposite positions on the same pair if you do not live in the US but I don't think OrderCloseBy() would save a spread because you had to already open two positions to use it.

 

1. You cannot open opposite positions at the same time if your broker is in US. That is true. With other brokers it is possible.

2. The way you get opposite positions (if they are allowed by your broker) is quite simple :). You buy and then sell, or vice versa.

3. The difference in lot size or the time at which each order was opened does not matter as far as OrderCloseBy is concerned.

4. OrderCloseBy is ment to substitute the use of OrderSend, so submitting OrderSend is not required. Simpy use "Close By" or "Multiple Close By" from within the Order Entry window, or use a script if you have one.

5. You do save a spread. But once! Here how it works. When you buy you pay a spread. When you sell you pay a spread. If you close them separately you loose both of those spreads (well they are in your P&L already), but if you do OrderCloseBy you are able to get one of those spreads back since it matches the closing price with opening price of the second trade. Simply put it assumes that when you opened the opposite trade you closed out the first one at the price at the opening price of the matching order.

They way I use OrderCloseBy is when I have a multiple one-sided positions and need to close them all quick I just lock the complete position with one trade, and then OrderCloseBy them with that new matching order. Obviously if you don't have an ability to lock the position you must close the initial multiple positions one-by-one which in a fast market could be quite damaging.

Hope this helps, and I did not simply repeat the things you know already.

<advertising removed by moderator>

 

I appreciate the help, but I still don't understand how you can close one ticket with another ticket number, if you can't open that second ticket in the first place.

And as to the hedging rule, why is it that you can hold the opposite positions in separate accounts, just not the same account?

Thanks again!

 

LouK:

I appreciate the help, but I still don't understand how you can close one ticket with another ticket number, if you can't open that second ticket in the first place.

You can't. For the reason you stated, OrderCloseBy() cannot be used by traders subject to the US no hedging rule.
 
SDC:
You can't. For the reason you stated, OrderCloseBy() cannot be used by traders subject to the US no hedging rule.

So those I see posting about using it to close same pair/opposite positions are outside US, correct?
 

Either they are or their broker is ....

 
SDC:

Either they are or their broker is ....


Thanks again. Seems to me the documentation could mention this in the OrderCloseBy entry.

By the way, can you explain why this is prohibited in a single account, while you can still have opposite positions in two accounts? (Though why you would do this I'm uncertain).

 

Probably because the NFA regulations doesn't say you can't do that...

Reason: