DOM syntax and logical update of the values

Questions about MultiCharts and user contributed studies.
User avatar
CrazyNasdaq
Posts: 259
Joined: 02 Sep 2009
Location: ITALY
Has thanked: 76 times
Been thanked: 77 times

DOM syntax and logical update of the values

Postby CrazyNasdaq » 25 Apr 2012

Today I've created a simple code to plot the DOM values and info on the chart. This step is useful to check the availability of the infos of the DOM syntax in powerlanguage and to check how does it work.
The result is not so good, but it a good step forward from which create something that could be very useful and great.
Here you can find a short video that describes what has been done and the problems that I've found.
http://www.youtube.com/watch?v=O4A8xVOJF2c&feature=youtu.be
(the video could be watched in HD full screen)

1 - The code has been written to RecalcLastBarAfter(1) (1 second)

Code: Select all

If DOM_IsConnected then begin
RecalcLastBarAfter(1);


2 - The levels of the DOM update only if a new trade has occured and not if the price of the DOM changes or if the size/quantity of the single level of the DOM change.

3 - The info of the DOM do not updates if there is no trade, and the update seems to be as a snapshot of the DOM at the moment of the trade.
You can check this looking at the Time & Sales on the Right margin. The DOM infos change only when a new trade occured on the Time&Sales.

Now this logic seems not so useful if the update logic of the DOM is the same as the update of the Price/volume (trade event to update the values). The DOM logic and syntax should be setted to update every time a DOM level price or DOM level quantity changes. This way every level of the DOM could be used to implement some strategies or indicators or logics, other way the info we get now are very partial and random, so every strategy or indicator we could create can not be accurate.
I think that the DOM logic and syntax is very useful to create a new step to analyze the market, but it should be thought to work based on a different way and update logic from the other "classical" indicators. The Updates of the DOM are different from the trade event (price/volume action), so we must use a different logic to update the DOM levels and INFO.
My congratulations go anyway to the programmers who have done a great work which we can develop on

SP
Posts: 441
Joined: 06 Feb 2006
Has thanked: 36 times
Been thanked: 280 times

Re: DOM syntax and logical update of the values

Postby SP » 25 Apr 2012

CrazyNasdaq,

the included ---Market Depth on Chart--- indicator (first on the list at insert study) updates on DOM changes, take a look how it is build. The code works fine for me.
These users thanked the author SP for the post:
JoshM

User avatar
CrazyNasdaq
Posts: 259
Joined: 02 Sep 2009
Location: ITALY
Has thanked: 76 times
Been thanked: 77 times

Re: DOM syntax and logical update of the values

Postby CrazyNasdaq » 26 Apr 2012

Thanks SP
I've not seen it before and seems fine.
I will investigate on the code to study the logic on it.
Thanks again


Return to “MultiCharts”