Login Page - Create Account

DTC Protocol Discussion Forum


Date/Time: Fri, 29 Nov 2024 16:46:38 +0000



why is PositionUpdate.Quantity a double

View Count: 2818

[2016-02-19 17:35:29]
onnb - Posts: 662
http://dtcprotocol.org/index.php?page=doc/doc_DTCMessages_TradingRelatedMessages.php#Messages-POSITION_UPDATE

In that link, the quantity field is a double - is there a reason that its not an int?
[2016-02-19 18:05:24]
DTC Engineering - Posts: 320
In the FIX protocol, quantities are doubles. Some Forex markets and Bitcoin markets do use fractional values.

If the Position Quantity is an integer with the trading service being used, then the double is simply going to contain an integer and it does not cause any problem.
Date Time Of Last Edit: 2016-02-19 20:10:51
[2016-02-19 20:04:56]
onnb - Posts: 662
Ok, does that impact the tick currency value in any way?

In the cases that there is a fractional position size, can I still do: CurrencyValyePerIncrement x # of ticks x Quantity
[2016-02-19 20:11:53]
DTC Engineering - Posts: 320
This formula still looks correct and we do not see this would be a problem.

Also in the case of Sierra Chart you will never get a fractional Position Quantity. Sierra Chart will always use integers.
Date Time Of Last Edit: 2016-02-19 20:12:27
[2016-02-19 20:42:15]
DTC Engineering - Posts: 320
From FIX protocol documentation for the Quantity (Qty) data type:

Qty  float  

float field capable of storing either a whole number (no decimal places) of "shares" (securities denominated in whole units) or a decimal value containing decimal places for non-share quantity asset classes (securities denominated in fractional units).

Date Time Of Last Edit: 2016-02-19 20:42:44

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account