Support Board
Date/Time: Wed, 14 May 2025 22:13:01 +0000
Post From: ACSIL - Discrepencies in T&S Records Sequence Numbers Between 2 instances of Sierra Chart
[2017-07-14 07:38:32] |
Zosimus - Posts: 345 |
When I run a study that I wrote that processes T&S entries on 2 different machines simultaneously I see differences in the values generated by the study. In order to check what is wrong I ran this simple T&S iteration code on 2 different machines simultaneously and got totally different Sequence numbers. The results of both iterations are attached. Both instances of Sierra use Rithimic and are set to to hold 5000 records of T&S (and have the same update interval). The code I used for the iteration is: if (sc.SetDefaults)
{ sc.GraphName = "T&S_Test"; sc.FreeDLL = 1; sc.AutoLoop = 1; sc.GraphRegion = 0; sc.UpdateAlways = 1; return; } if(sc.Index == sc.ArraySize - 1){ SCTimeAndSalesArray TimeSales; sc.GetTimeAndSales(TimeSales); if (TimeSales.Size() == 0) return; int64_t& LastProcessedSequence = sc.GetPersistentInt64(1); SCString str; if (LastProcessedSequence != 0){ for (int TSIndex = 0; TSIndex < TimeSales.Size() ; ++TSIndex){ if(TimeSales[TSIndex].Sequence < LastProcessedSequence) continue; if (TimeSales[TSIndex].Type == SC_TS_BID || TimeSales[TSIndex].Type == SC_TS_ASK ){ int Sequnce = TimeSales[TSIndex].Sequence; str.Format("TTSIndex= %i Sequence = %i",TSIndex, Sequnce); sc.AddMessageToLog(str,0); } } } LastProcessedSequence = TimeSales[TimeSales.Size()-1 ].Sequence; } Date Time Of Last Edit: 2017-07-14 12:20:46
|
![]() ![]() |