I've asked this problem before but in a different scenario. I spoke to a representative of FXCM today on the phone and he told me that I was trying to place a limit order below market profit as a profit target. Which I doubt is the case.
Here is the scenario.
On March 31st I entered a long EURCAD trade at 1.3615 at 15:58. My strategy immediately tried to place a limit sell order as profit target at 1.3627. That limit order failed and gave me the following error:
“Order rejected: Order price too far from market price :1.35639 vs 1.36128 affected Order: Sell 1000 Limit @ 1.3627” is a message generated from the strategy.
So exactly what does this error mean? The person from FXCM tried to convince me I tried to place a limit order at 1.35639, which I don't think is the case. I think the strategy tried to place a limit sell at 1.3627 .. and the error message says right? (sell 1000 limit @ 1.3627) .
So what exactly is that 1.35639 price? Is that the current market price?
The result from this failed sell limit order was that the position was closed immediately and the strategy was disabled.
I use EnterLong() for long order and SetProfitTarget() for limit sell order.
Only scenario I can think of is that the SetProfitTarget still has a value from a previous position that is not reset yet after the previous position was closed.
Maybe it's better to use an ExitLongLimit() method?
Comment