Issue with DOM_ calls

Questions about MultiCharts and user contributed studies.
fltngpnt
Posts: 9
Joined: 14 Jun 2022
Has thanked: 2 times

Issue with DOM_ calls

Postby fltngpnt » 27 Oct 2022

I'm using MC 14.0 with a CQG depth of market data feed. When I insert calls for DOM data (whether it's asksize, bidsize, bidprice, askprice) I get only intermittent returns, and many returns are simply zero. When I use the boilerplate code for DOM_IsConnected:

Code: Select all

Variables: var0(0); If DOM_IsConnected then var0 = DOM_AskPrice(5); Print(var0);
I get a long list of zeros and only a handful of price returns:
[... lots of zeros ...]

0.00
0.00
0.00
0.00
3829.75
3828.25
3827.25
3826.00

Am I doing something wrong? Anyone else having this issue? Any way to fix it?

P.S.: When I open the DOM trading window I get ten levels of continuously updating order data, so I don't think the issue is with the data feed itself.

User avatar
Polly MultiCharts
Posts: 189
Joined: 20 Jul 2022
Has thanked: 1 time
Been thanked: 53 times

Re: Issue with DOM_ calls

Postby Polly MultiCharts » 28 Oct 2022

Hello fltngpnt,

You need to add the ‘begin’ and ‘end’ to make ‘Print’ work under the condition as well.
Please see the code sample for reference:

Code: Select all

Variables: var0(0); If DOM_IsConnected then begin var0 = DOM_AskPrice(5); Print(var0); end;


Return to “MultiCharts”