Opening a position

Created at 01 Apr 2019, 04:42
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!
A.

a.fernandez.martinez

Joined 02.03.2019

Opening a position
01 Apr 2019, 04:42


Hello,

 

I have a doubt on the api to open a new position.

I don't understand the pending order, if I want to open a position I just use ExecuteMarketOrder right ?

Does that create a pending order that I have to wait to get accepted by the server ?

 

Thanks,


@a.fernandez.martinez
Replies

firemyst
01 Apr 2019, 07:36

RE:

a.fernandez.martinez said:

Hello,

 

I have a doubt on the api to open a new position.

I don't understand the pending order, if I want to open a position I just use ExecuteMarketOrder right ?

Does that create a pending order that I have to wait to get accepted by the server ?

 

Thanks,

As far as I know and understand, the ExecuteMarketOrder creates a new "position", not an "order". 

Then you have to test to see if it was successful. Eg, TradeResult r; if r.IsSuccessful then ... 

If the result is successful, it was accepted by the server. 


@firemyst

PanagiotisCharalampous
02 Apr 2019, 11:48

Hi a.fernandez.martinez,

You can learn about the different order types available in cTrader here.

Best Regards,

Panagiotis


@PanagiotisCharalampous