Jump to content
Cinemizer

Placing Multiple Order

Recommended Posts

Hi Cinemizer,

Do you mean placing more than one entry order at a time? You can only place 1 entry order at a time, but if you are placing "Once Cancels the Other" (OCO) or If/Done orders, then more than one order is placed at the same time. However, those additional orders are conditional.

Kind Regards, PM

Share this post


Link to post

Hello,

How can I calculate or get the information about, how much value has got one PIP in a market trade ?

If I login by web surface to forex.com, before placing a trade I will be informed about it and also about required marge on the bottom of window.

But the function
POST https://ciapi.cityindex.com/TradingAPI/order/simulate/newtradeorder
informs me only about margin, but not about PI value of minimum quantity.

How can I get PIP value ?

 

Share this post


Link to post

Hi Cinemizer,

In answer to your question about obtaining PIP value.

This is calculated from field values obtained by making a GetMarketInformationCall. I believe you are a US client trading spot FX? The formula is then:

Spot FX Market: (Quantity * (TrailingStopConversionFactor || 1) * fxConversion) / QuantityConversionFactor

Kind Regards, PM

Share this post


Link to post

Hello Cinemizer,

In answer to your question about obtaining account resource information.

Usually, you obtain these values as live, updating numbers via the ClientAccountMargin stream. However, if you want a static snapshot of these values, you can use the GetClientAccountMargin HTTP Get call. 

Kind Regards, PM

Share this post


Link to post

Thx, but which values are these?

(Quantity * (TrailingStopConversionFactor || 1) * fxConversion) / QuantityConversionFactor

In return answer: ApiMarketInformationDTO

http://docs.labs.gaincapital.com/#Data Types/ApiMarketInformationDTO.htm

I have found:

"QuantityConversionFactor" but did not found return value as "fxConversion" and "TrailingStopConversionFactor".

And waht does "|| 1" mean ?  "OR" by 1 ?

Please write me the right formula from return values of ApiMarketInformationDTO to calculate PIP value.

 

By the way:

In this example:

http://docs.labs.gaincapital.com/#HTTP Services/GetMarketInformation.htm%3FTocPath%3DCIAPI%20Reference|HTTP%20Services|Market|_____2

GBP/USD ID will be written in the description text as: 401166448 but in the example below will be written:

GET https://ciapi.cityindex.com/TradingAPI/market/401166447/information

Theses are not the same market ID number. I guess, this is a failure. I do not know which ID is really the GBP/USD, but please correct the bad ID.

Share this post


Link to post

Hello,

TrailingStopConversionFactor should also be returned with the MarketInformation call along with the QuantityConversionFactor (see screenshot)

fxConversion is the actual conversion rate from the currency base pair you are trading to your account currency. So if you are trading GBP/USD, then USD is the pair base currency, therefore you will need to convert USD to GBP to obtain the PIP value in pounds, instead of a PIP value in USD. 

Example: quantity 1 CFD contract in GBP/USD is a PIP value of 1USD, which when converted back to account currency in pounds is PIP value = £0.80 approximately.

Yes, (TSCF || 1) means use TSCF unless its value is null then use 1 instead. || means OR as you correctly guessed.    

 

The code examples are not meant to be used verbatim. The marketIDs differs between brands such as City Index or FOREX.com etc. The examples are just generic representations of how the code should look like approximately. When using the code, you should for example follow the instructions described in: http://docs.labs.gaincapital.com/#How Do I/Find Market ID.htm%3FTocPath%3DHow%20Do%20I...%3F|_____1 to find the correct market ID that you have access.

Kind Regards, PM 

image.png

Share this post


Link to post
On 5/26/2020 at 5:25 AM, Physicsman said:

Hi Cinemizer,

Do you mean placing more than one entry order at a time? You can only place 1 entry order at a time, but if you are placing "Once Cancels the Other" (OCO) or If/Done orders, then more than one order is placed at the same time. However, those additional orders are conditional.

Kind Regards, PM

Hi PM,

Do you mean for a specific currency pair, there can only be 1 open entry order? Or can I submit multiple separate entry orders on the same pair? I'm a US resident, so I cannot have If/Done orders on an open entry order. Can I have OCO orders with an open entry order?

Thank you!

Share this post


Link to post

Hi Forexphile,

You can have more than one open entry order even as a US client. You can also create and use OCO orders.

As an example: you can create an entry order for GBP/USD at 1.4200 and 1.4250 while the market is currently trading at 1.4120 now.  Should the market go up to 1.4200 that order will trigger and fill creating a new open position. Similarly, should the market continue up and hit 1.4250, the 2nd entry order will also trigger and fill. 

The only thing to note as a US client is that you cannot attach closong stop loss or take profit limit orders to these individual positions. By rule, closing orders will be on your net overall position on the market. 

Kind Regards, PM

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×