Login Page - Create Account

Support Board


Date/Time: Fri, 31 Jan 2025 11:47:00 +0000



ASCIL: sc.Bid, sc.Ask float is odd?

View Count: 747

[2019-05-03 15:34:54]
TedMar - Posts: 190
on live CQG connection, when i output sc.Ask or sc.Bid without Flags to cut/cast float (%f) i get ASK/BID odd value like 57.629997
check pic.


whats wrong?, in fact i need sc.Ask/Bid the value for calculatios. Is posible get them without any casting?
image2019-05-03 13_21_17-Window.png / V - Attached On 2019-05-03 15:30:51 UTC - Size: 22.59 KB - 232 views
[2019-05-03 18:56:34]
Sierra Chart Engineering - Posts: 104368
Yes that does make sense what you see. You need to use %.2f in this case to round off the floating-point error.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2019-05-03 19:14:36]
TedMar - Posts: 190
but symbols have diffrent Ticksize , i can not cut all with %.2f

i tryed
.....

float rAsk = sc.RoundToTickSize(sc.Ask/sc.TickSize);
rAsk = rAsk * sc.TickSize;

but result is same as sc.Ask

any ideas?
[2019-05-03 19:20:55]
Sierra Chart Engineering - Posts: 104368
Therefore, use this function:
sc.FormatGraphValue()
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2019-05-03 19:21:02
[2019-05-03 19:27:18]
TedMar - Posts: 190
Therefore, use this function:
sc.FormatGraphValue()

unposible, i have not chart open

i use s_SCBasicSymbolData with sc.GetBasicSymbolData

any other idea?

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

Login

Login Page - Create Account