value more than insidebid  [SOLVED]

Questions about MultiCharts and user contributed studies.
waldem
Posts: 108
Joined: 18 Nov 2013
Has thanked: 3 times
Been thanked: 4 times

value more than insidebid

Postby waldem » 07 Apr 2016

Hallo team, should be possible to have the keyword " second bid" 3rd bid" etc?
today if i'm correct only insidebid/ask exist with the best, i would like to know also the other level.

should be possible require this for the next release?

User avatar
Henry MultiСharts
Posts: 9066
Joined: 25 Aug 2011
Has thanked: 1256 times
Been thanked: 2911 times

Re: value more than insidebid  [SOLVED]

Postby Henry MultiСharts » 07 Apr 2016

Hello waldem,

These are the commands you are looking for:
https://www.multicharts.com/trading-sof ... tegory:DOM

waldem
Posts: 108
Joined: 18 Nov 2013
Has thanked: 3 times
Been thanked: 4 times

Re: value more than insidebid

Postby waldem » 08 Apr 2016

hallo, why if i do a simple print: Print (dom_askprice(2)); i got error "Invalid Argument"?

User avatar
Henry MultiСharts
Posts: 9066
Joined: 25 Aug 2011
Has thanked: 1256 times
Been thanked: 2911 times

Re: value more than insidebid

Postby Henry MultiСharts » 08 Apr 2016

Please refer to the sample code in the DOM_IsConnected description or the prebuilt indicator "--- Market Depth on Chart ---".

waldem
Posts: 108
Joined: 18 Nov 2013
Has thanked: 3 times
Been thanked: 4 times

Re: value more than insidebid

Postby waldem » 08 Apr 2016

thank you, i tried and it works.
strange things is that if i plot only one bid or ask work, if i try to plot both i get same argument error, but maybe is broker problem.

Code: Select all

variables:
var0(0),var1(0);

if (LastBarOnChart_s = True) then begin
RecalcLastBarAfter(0.1);

if dom_isconnected then
var0 = dom_bidprice(0);
var1 = dom_askprice(0);
print(var0,var1);

end;

User avatar
ABC
Posts: 626
Joined: 16 Dec 2006
Has thanked: 119 times
Been thanked: 355 times
Contact:

Re: value more than insidebid

Postby ABC » 09 Apr 2016

thank you, i tried and it works.
strange things is that if i plot only one bid or ask work, if i try to plot both i get same argument error, but maybe is broker problem.
Hi waldem,

you should include all DOM price checks in the dom_isconnected check and not just the first one.
That's likely why you receive an error when you try to print both.

Code: Select all

if dom_isconnected then
begin
var0 = dom_bidprice(0);
var1 = dom_askprice(0);
end ;
print(var0,var1);
Regards,

ABC


Return to “MultiCharts”