Place limit order bug?

Created at 15 Sep 2015, 17:35
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
CL

cloesd

Joined 28.02.2015

Place limit order bug?
15 Sep 2015, 17:35


Hi,


I'm coding an algo and can't get a limit order to be put in properly.

I'm on the one hour chart:

I set the limit order using:

(Tested the stoploss/volume control etc, just not sure about whether to use stoporder or limitorder)

 PlaceStopOrderAsync(TradeType.Sell, Symbol, Symbol.NormalizeVolume(safebet()), triggerprice, "gen3Spawn", StopLoss, TakeProfit);

Trigger price is set using:

triggerprice = MarketSeries.Open.Last(1);

(called OnBar)

 

I want to set the order on the OPEN of the bar (price 1.26990) but even though the order is set in the eventlog. It executes at 1.26829.(The open of the next bar)


@cloesd
Replies

cloesd
15 Sep 2015, 17:36

RE:

 

ALSO:

I've already tried changing the trigger to:

triggerprice = MarketSeries.Open.Last(2);

(incase it was picking up the new bar somehow, but still doesn't work).


@cloesd

Spotware
16 Sep 2015, 07:10

Dear Trader,

With a Stop Order, once the symbol prices reaches the entry price you set, a Market Order will be automatically sent by the platform and it will be filled at the best available price. That means that it will sometimes be filled outside of the exact price you set, as the market may move in between the time it takes for your order to be sent and your order to be filled. This is the order type used for Stop Loss and Take Profit.

For example, if you want to sell a currency which is currently trading at 1.3000, you can place a stop order to sell at 1.2900. Your order will be filled at the best available price once the rate reaches 1.2900.

Additionally we recommend you to have a look at our support site.


@Spotware