Support Board
Date/Time: Sun, 24 Nov 2024 16:25:27 +0000
[Programming Help] - sc.BidSize / sc.AskSize always 0? Why?
View Count: 246
[2024-05-17 17:45:16] |
User275839 - Posts: 61 |
I have a simple study that logs values from sc.BaseData[]. Although on consecutive calls you can see bid/ask prices, and cumulative bar volume and bid vol and ask vol values are incrementing, sc.BidSize and sc.AskSize are always 0. In the docs they are listed as "read-only float variables" Does anyone know what those 2 values are and when they are actually valid? 2024-05-17 10:37:57.220 | Chart: NQM24_FUT_CME[M] 1350 Trades #1 | Study: _DataFeedValuesTest_v01 | Bar#/BarVol: 9356/761.00 sc.Bid: 18620.50, sc.Ask: 18621.00, sc.BidSize: 0.00, sc.AskSize: 0.00 2024-05-17 10:37:57.220 | Chart: NQM24_FUT_CME[M] 1350 Trades #1 | Study: _DataFeedValuesTest_v01 | BAR#: 9356, sc.BidVolume: 429.00, sc.AskVolume: 332.00, sc.UpTickVolume: 386.00, sc.DownTickVolume: 375.00 2024-05-17 10:37:57.220 | Chart: NQM24_FUT_CME[M] 1350 Trades #1 | Study: _DataFeedValuesTest_v01 | 2024-05-17 10:37:57.717 | Chart: NQM24_FUT_CME[M] 1350 Trades #1 | Study: _DataFeedValuesTest_v01 | Bar#/BarVol: 9356/762.00 sc.Bid: 18620.25, sc.Ask: 18620.50, sc.BidSize: 0.00, sc.AskSize: 0.00 2024-05-17 10:37:57.717 | Chart: NQM24_FUT_CME[M] 1350 Trades #1 | Study: _DataFeedValuesTest_v01 | BAR#: 9356, sc.BidVolume: 430.00, sc.AskVolume: 332.00, sc.UpTickVolume: 386.00, sc.DownTickVolume: 376.00 2024-05-17 10:37:57.717 | Chart: NQM24_FUT_CME[M] 1350 Trades #1 | Study: _DataFeedValuesTest_v01 | 2024-05-17 10:37:58.212 | Chart: NQM24_FUT_CME[M] 1350 Trades #1 | Study: _DataFeedValuesTest_v01 | Bar#/BarVol: 9356/765.00 sc.Bid: 18620.25, sc.Ask: 18620.50, sc.BidSize: 0.00, sc.AskSize: 0.00 2024-05-17 10:37:58.212 | Chart: NQM24_FUT_CME[M] 1350 Trades #1 | Study: _DataFeedValuesTest_v01 | BAR#: 9356, sc.BidVolume: 431.00, sc.AskVolume: 334.00, sc.UpTickVolume: 386.00, sc.DownTickVolume: 379.00 Date Time Of Last Edit: 2024-05-17 18:38:40
|
[2024-05-17 18:36:28] |
Sierra_Chart Engineering - Posts: 17156 |
This is not what we see from that log: sc.Bid and sc.Ask are always 0.
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 |
[2024-05-17 18:40:33] |
User275839 - Posts: 61 |
D'oh! I mean sc.BidSize and sc.AskSize. I'm simply logging the variables sc.BidSize and sc.AskSize on each pass through the study. When would those be non-zero?
|
[2024-05-17 19:45:15] |
Sierra_Chart Engineering - Posts: 17156 |
They will be nonzero when connected to the data feed, the market is open, and the chart is not being replayed.
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 |
[2024-05-17 22:04:43] |
User275839 - Posts: 61 |
Oh... I checked my code and the docs again. I was using %.2f to format the integer values sc.BidSize and sc.AskSize. I changed the formatting to %d and the values now print as expected. Thank you for clarifying when those values are accessible and valid. |
To post a message in this thread, you need to log in with your Sierra Chart account: