ExecuteMarketOrder Time Out

Created at 11 Mar 2015, 18:29
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!
cAlgoTrading's avatar

cAlgoTrading

Joined 13.06.2014

ExecuteMarketOrder Time Out
11 Mar 2015, 18:29


Hello,

I want to ask if I send a ExecuteMarketOrder request and the price does not get in the market range!

how much time it take before it got rejected if the price never return to the market range?

also is there any way I specify a timeout for this proccess?

Thanks in advance!

cAlgoTrading


@cAlgoTrading
Replies

Spotware
12 Mar 2015, 17:58

Currently timeout for market range order is 5 sec. You cannot configure it.

We can recommend you to use Limit Order with expiration time.


@Spotware

Rod_Sands
13 Mar 2015, 06:22

RE:

Spotware said:

Currently timeout for market range order is 5 sec. You cannot configure it.

We can recommend you to use Limit Order with expiration time.

I suppose that looping thru  ever 5 sec would also be a solution as I would sometime prefer not to have my early SL or TP on the server.

ExecuteMarketOrder(TradeType.Buy, Symbol, 5000, "myRobot", StopLoss, TakeProfit, Slippage, "this is a comment");

 

Question  :  how to accomplish a TP with  Slippage, say 1 pip, the purpose being a cBot initiating a TP (or early exit SL) before the TP or SL is hit on the server.


@Rod_Sands

Rod_Sands
13 Mar 2015, 06:26

RE: RE:

Rod_Sands said:

Spotware said:

Currently timeout for market range order is 5 sec. You cannot configure it.

We can recommend you to use Limit Order with expiration time.

I suppose that looping thru  ever 5 sec would also be a solution as I would sometime prefer not to have my early SL or TP on the server.

ExecuteMarketOrder(TradeType.Buy, Symbol, 5000, "myRobot", StopLoss, TakeProfit, Slippage, "this is a comment");

 

Question  :  how to accomplish a TP with  Slippage, say 1 pip, the purpose being a cBot initiating a TP (or early exit SL) before the TP or SL is hit on the server.

PS ie how to use such as ClosePosition with slippage?


@Rod_Sands

Spotware
16 Mar 2015, 16:48

PS ie how to use such as ClosePosition with slippage?

cAlgo.API doesn't provide the ability to close position with slippage.


@Spotware

AlexanderRC
19 Mar 2015, 18:24

RE:

Spotware said:

PS ie how to use such as ClosePosition with slippage?

cAlgo.API doesn't provide the ability to close position with slippage.

If the account is netted, isn't enough to call ExecuteMarketOrder with the different direction than the current position and adding slippage to the call?

If the account is hedged or netted, isn't it enough to place TP with ModifyPosition below the current bid price (for buy position), just where the max slippage should be? Even if TP is negative?


@AlexanderRC