Login Page - Create Account

Support Board


Date/Time: Mon, 21 Apr 2025 23:27:30 +0000



DTC - Price1 not precise

View Count: 303

[2023-02-17 08:36:18]
User251043 - Posts: 47
Hi,

I'm writing a DTC Server and using SC as the client.

I sent a Limit order at price 24400. I sent it from the trading panel. But when I review the DTC messages I find that SC is setting 'Price1' to 24399.9994546175 instead of 24400, what is forcing the server to make some extra calculations.

How can I setup SC so it sends the order at $24400, and not at $24399.9994546175?

Thank you
[2023-02-17 12:01:41]
Sierra_Chart Engineering - Posts: 19290
There is not a way to solve this. It has to do with floating-point error at the level of the CPU.

You will need to round off the value to the nearest integer in this particular case.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account