I'm having a problem with handling stop/limit and partial closing of a trade on a US account (i.e. FIFO account).
Now, I've been trying to code this in a strategy, and I'm pretty sure I had this working some months ago. But currently it is not working. So, I tried to manually reproduce what my code is trying to do.
The steps are as follows ... (remember this is all manually entered using MarketScope or TradingStation, not even talking about code yet):
1) open a trade at market, (e.g. long 10 lots), specifying stop & limit when the position is created (e.g. -5/+5 pips)
2) partially close the trade, e.g. by shorting 5 lots. I should be left with 5 lots long, and the stop and limit intact.
3) Now, wait for the stop or limit to get hit by price.
(Also, should say that I only have 1 position on, and so there is no issue with other trades. It is simply 1 trade entered and then partially closed).
What I expect:
When the stop/limit gets hit, the remainder of the trade closed. If the stop is hit, the limit gets cancelled. If the limit is hit, the stop gets handled. The trade should be closed, i.e. I should be flat.
What I actually see:
The stop/limit "appears" to get hit, and if I look at the "Orders" tab on MarketScope it says filled/cancelled. However, the trade is not closed. The trade remains open and unprotected. The orders seem to stay in the "Orders" tab in their filled/cancelled state for ever (eventually it cleared over the weekend).
On live account, this seems to work as expected!
On back-tester, it also does not work properly (the stop orders seem to vanish as soon as the partial close takes place). I previously raised bug-report about this back-test behaviour.
My understanding is that I should be able to enter an order with ELS stop/limit specified, and then I should be able to partially close the position, and the stop/limit still exist (for smaller amount of course).
I contacted FXCM, but apparently they can't see demo accounts and couldn't explain why it was happening. They did confirm my understanding that this should work.
Is this an issue with how demo account orders are handled? I'm sure this used to work. Has something changed?
I've been banging my head on the wall about this for some days. Any help would be appreciated.
Thanks.