Possible to plot Level 2 "Line On Close" bars on chart?  [SOLVED]

Questions about MultiCharts and user contributed studies.
M747
Posts: 25
Joined: 05 Feb 2016
Has thanked: 12 times
Been thanked: 2 times

Possible to plot Level 2 "Line On Close" bars on chart?

Postby M747 » 01 Mar 2016

Hello MC,

I don't think this is possible when backtesting, but when live trading is it possible to make a chart that shows separate "Line On Close" bars for each of the 10 levels of market depth data? This would mean the chart would show 10 different "Line On Close" bars at the same time.

Two questions if so:

1. Can these "Line On Close" bars be Time based?
2. Can these "Line On Close" bars be Tick based?

Thanks.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Possible to plot Level 2 "Line On Close" bars on chart?

Postby TJ » 01 Mar 2016

Hello MC,

I don't think this is possible when backtesting, but when live trading is it possible to make a chart that shows separate "Line On Close" bars for each of the 10 levels of market depth data? This would mean the chart would show 10 different "Line On Close" bars at the same time.

Two questions if so:

1. Can these "Line On Close" bars be Time based?
2. Can these "Line On Close" bars be Tick based?

Thanks.
Please draw a picture to illustrate your "plots".

M747
Posts: 25
Joined: 05 Feb 2016
Has thanked: 12 times
Been thanked: 2 times

Re: Possible to plot Level 2 "Line On Close" bars on chart?

Postby M747 » 01 Mar 2016

Hi TJ,

I guess "Plot" may have been the wrong word for what I'm trying to do. I thought "Plot" means any type of graphical representation of data. Does it mean something different?

Anyway, attached 1.jpg is a hypothetical chart I made in photoshop for the symbol ESH16 that show all 10 levels of market depth. This is that chart I'm looking to make.

Any tips on how to make this chart or something similar?

Thanks
Attachments
1.jpeg
(869.05 KiB) Downloaded 595 times

janus
Posts: 835
Joined: 25 May 2009
Has thanked: 63 times
Been thanked: 104 times

Re: Possible to plot Level 2 "Line On Close" bars on chart?  [SOLVED]

Postby janus » 01 Mar 2016

Yes I have done that some time ago. It uses the DOM_* keywords to collect the information, starting with DOM_askscount and DOM_bidscount to determine the number of levels (not all instruments have 10 levels) then use DOM_asksize and DOM_bidsize to retrieve the market depth values for each level, and finally plot them individually. This is real-time only. A very long time I even stored these values in a file so I could display them and continue with the real-time. I also stored them in an array so I could use them in my decision rules. It was a little tricky since the historical time-stamps of the back-filled price data often didn't match the recorded real-time time-stamps I stored in the file. I managed to workaround that annoying feature of IB. Boy I hate that :-(

I don't see it being an issue to display the real-time values in tick as well as time based values. In fact I do that on a Renko chart but in this case I display the two totals, not the individual sizes - see attached screenshot.
Attachments
2016-03-02_12-26-25.png
(5.66 KiB) Downloaded 593 times


Return to “MultiCharts”