Hi, I have a CQG demo account (AMP) and I am regularly receiving its data feed. What I need is to intercept real time data via a power language script for subsequent computation (i.e. last trade price and quantity and last bid and ask price and quantity for a Comulative Volume Delta indicator).
Attached is a piece of test code I want to submit to your attention.
I am facing some problems:
1- is it the right way to grab realtime book data?
2- if so, why this code displays values different from the ones of the Time and Sales table?
3- how can I trust what I get from my script? In other words, is there a way to test the output of my code making somewhere a comparison with the data CQG is sending?
Thank you for your help,
sebastiano
(running MultiCharts .NET SE Version 8.7)
powerlanguage: getting realtime data
-
- Posts: 2
- Joined: 01 Sep 2013
powerlanguage: getting realtime data
- Attachments
-
- __PB_classica.Indicator.zip
- (834 Bytes) Downloaded 445 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: powerlanguage: getting realtime data
Hello sebastiano,
1. In general - this is the right way to get realtime data.
2. The difference is that T&S shows the price and the volume of the completed trade, while in your code with the help of DOM access you are receiving the price and volume of the current orders on bid and ask. That is different data.
T&S window is populated with the data used for building Volume Profile and Volume Delta chart type. You can access this data via DataLoader - Data2 result.
3. You can compare your calculations with Volume Profile and Volume Delta chart.
1. In general - this is the right way to get realtime data.
2. The difference is that T&S shows the price and the volume of the completed trade, while in your code with the help of DOM access you are receiving the price and volume of the current orders on bid and ask. That is different data.
T&S window is populated with the data used for building Volume Profile and Volume Delta chart type. You can access this data via DataLoader - Data2 result.
3. You can compare your calculations with Volume Profile and Volume Delta chart.