Support Board
Date/Time: Tue, 04 Mar 2025 12:05:17 +0000
Time and Sales as they come in, instead of in an array
View Count: 1105
[2021-12-10 03:38:27] |
KylieV1618 - Posts: 67 |
Is there a way to get the Trades, as they come in, instead of in an array, through ACSIL?? Like, is there a way to access the stream of trades as they occur, from inside Sierra Chart,. I already implemented this outside of Sierra Chart with DTC, but was limited to only Live data, and market replay didnt output any data. So I decided to move into sierra chart, and program a similar thing. But the way the Time and Sales works, (in arrays) is also not going to work for what I want. Surely there must be an easy way to read the stream of trades? Or how would you go about reading the array, more like a stream, as opposed to a batch. Right now, depending on the ms refresh rate of my chart, thats how fast the array gets refreshed. But every loop through that, is just gonna give me a whack of sounds all at the same time. Not seperated by timestamp as they came in. So right now, I just have a blast of sounds for every tick that happens on the chart. But I want them to play exactly as they occured not in batches of 15ms syncs. EXAMPLE. Ten trades occur in rapid succession. I want to have a sound played for every single one, exactly when the trade occured. But right now, because the array is an array, and I loop through it, it just plays the sounds for those trades all at once. And then they never stop playing, cuz the array is always full, and so they just build and build ontop of each other until the volume becomes excruciating and I have to shut down. So I need some sort of flag, to say "this trade has played", with a timestamp or something. But that seems like overkill. Surely I can just access the trades as they come in?? And if not? Why not? Ive tried having something in Subgraph[0].Arrays[0][OutputArrayIndex] = 1; as a flag if a sound has played or not. But it doesnt matter. They still all play as a batch every 15ms or when a tick occurs on the chart. Why can I not just access the trades as they flow?? Date Time Of Last Edit: 2021-12-10 04:12:46
|
[2021-12-10 04:33:30] |
KylieV1618 - Posts: 67 |
I assume I can setup a Relay server, and access realtime trades from that. Can I do that inside an ACSIL function? if so can you guide me how to do that?? |
[2021-12-12 17:15:37] |
|
Based upon what you do, we do recommend you use ACSIL: Advanced Custom Study Interface and Language (ACSIL) You will want to access the Time and Sales data with this function: ACSIL Interface Members - Functions: sc.GetTimeAndSales() And there is a continuously incrementing sequence number for time and sales records. When you process a time and sales record, remember its sequence number and never process a record with a sequence number less or equal to that number. 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 |
To post a message in this thread, you need to log in with your Sierra Chart account: