Hello - Can anyone post a sample code to access the last "N" T&S records for an instrument? Preferably would like to use it on a scanner/chart combination. Main intention is to get access this T&S array - irrespective of the chart type used ( independent of the bar they belong to. Appreciate any input on this.
information needed :
- Time, Price, Volume & Trade type ( ask/bid/below bid/above offer/other)
Thanks in advance.
Accessing last "N" T&S records - for any chart type
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Accessing last "N" T&S records - for any chart type
Hello vking,
If you want to operate with the Time and Sales data then you need to utilize the Volume Profile data collection. Here is how to do that: 4.7.6_Volume_Profile
If you want to operate with the Time and Sales data then you need to utilize the Volume Profile data collection. Here is how to do that: 4.7.6_Volume_Profile
Re: Accessing last "N" T&S records - for any chart type
Hi Henry,
I understand that the volume profile data collection need to be used for getting an accurate time & sales instead of the Bars.UpTicksValue and Bars.DownTickValue but I have problem getting the info timewise. Would it be possible to get a sample code to see in realtime the time & sales ? I think it would help a lot of people.
Thanks a lot.
I understand that the volume profile data collection need to be used for getting an accurate time & sales instead of the Bars.UpTicksValue and Bars.DownTickValue but I have problem getting the info timewise. Would it be possible to get a sample code to see in realtime the time & sales ? I think it would help a lot of people.
Thanks a lot.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Accessing last "N" T&S records - for any chart type
Attached is a sample indicator that plots the last time & sales value in realtime. You need to have the Volume Profile enabled for the data series the indicator is based on.Hi Henry,
I understand that the volume profile data collection need to be used for getting an accurate time & sales instead of the Bars.UpTicksValue and Bars.DownTickValue but I have problem getting the info timewise. Would it be possible to get a sample code to see in realtime the time & sales ? I think it would help a lot of people.
Thanks a lot.
- Attachments
-
- T&S.png
- (54.08 KiB) Downloaded 3324 times
-
- Plot_T&S.wsp
- (119.87 KiB) Downloaded 960 times
-
- Test_Plot_T&S.pln
- (1.13 KiB) Downloaded 989 times
Re: Accessing last "N" T&S records - for any chart type
Volume for any tick is easy to know ... but how to know if it was done on the bid or the ask.... ? Comparing the tick volume with the bid and ask time series gives some problems. It would be nice to get a volume based on the bid/ask like Bars.askticksvalue & Bars.bidticksvalue or bars.volumeside ....
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Accessing last "N" T&S records - for any chart type
franky, please find attached the code that plots "Price, Volume, Filled at Ask/Bid" values.Volume for any tick is easy to know ... but how to know if it was done on the bid or the ask.... ? Comparing the tick volume with the bid and ask time series gives some problems. It would be nice to get a volume based on the bid/ask like Bars.askticksvalue & Bars.bidticksvalue or bars.volumeside ....
- Attachments
-
- T&S.png
- (29.44 KiB) Downloaded 3286 times
-
- Test_T_and_S_ab_traded.pln
- (1.73 KiB) Downloaded 1069 times
Re: Accessing last "N" T&S records - for any chart type
Hi Henry,
that is a fine piece of code and nearly what i am currently looking for, if it would also print the current bid/ask depth (would need both regardless of trade direction) on every trade made. I spent two days to implement this myself but failed, maybe you could provide an update?
Something like that would be awesome:
Price(1,769.75) / Volume(9) / FilledAt(Ask) /CurrentBidDepth(435 = lmt-orders on bid) / CurrentAskDepth(50 = lmt-orders on ask)
Thanks a lot for your time in advance.
Stefan
that is a fine piece of code and nearly what i am currently looking for, if it would also print the current bid/ask depth (would need both regardless of trade direction) on every trade made. I spent two days to implement this myself but failed, maybe you could provide an update?
Something like that would be awesome:
Price(1,769.75) / Volume(9) / FilledAt(Ask) /CurrentBidDepth(435 = lmt-orders on bid) / CurrentAskDepth(50 = lmt-orders on ask)
Thanks a lot for your time in advance.
Stefan