From a user:
"since each TS data line consists of either Bid/Ask info or Price/Size info on one line but not both... and we need both on each line.
so let me tell you what we want and maybe you can tell us which is the best way to go...
What we want is the following info on each data line with NO DUPLICATIONS OF DATA STRUCTURES
TIME, SYMBOL, PRICE, TRADESIZE, BID, ASK... "
If you want everything on one line, but don't want duplicate trades, the result is that you only want trades.
You should be checking DataType in the structure for tsdTrade. It is likely a binary flag, so test it using unary AND. If (DataType & tsdTrade) etc.
In another problem, COM exception, might be caused because you are not doing:
Private Sub FillTS()
Dim lNumBars, lNumRtBars, lBar, lDiff As Long
Dim item As IESignal.TimeSalesData
item = new IESignal.TimeSalesData
Is lLastRtCount initialized properly to 0 somewhere?
"since each TS data line consists of either Bid/Ask info or Price/Size info on one line but not both... and we need both on each line.
so let me tell you what we want and maybe you can tell us which is the best way to go...
What we want is the following info on each data line with NO DUPLICATIONS OF DATA STRUCTURES
TIME, SYMBOL, PRICE, TRADESIZE, BID, ASK... "
If you want everything on one line, but don't want duplicate trades, the result is that you only want trades.
You should be checking DataType in the structure for tsdTrade. It is likely a binary flag, so test it using unary AND. If (DataType & tsdTrade) etc.
In another problem, COM exception, might be caused because you are not doing:
Private Sub FillTS()
Dim lNumBars, lNumRtBars, lBar, lDiff As Long
Dim item As IESignal.TimeSalesData
item = new IESignal.TimeSalesData
Is lLastRtCount initialized properly to 0 somewhere?
Comment