Bookmap

Questions about MultiCharts and user contributed studies.
mickatrade
Posts: 114
Joined: 12 Jul 2015
Has thanked: 20 times
Been thanked: 16 times

Bookmap

Postby mickatrade » 19 Jul 2016

Hello,

I've created an indicator that looks like bookmap, i'm currently using point style to plot the indicator. Is it possible to add square or rectangle styles in future versions of MC. I've tried left tick and right tick but they aren't centered.

Image

Thx

User avatar
arnie
Posts: 1594
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 481 times
Been thanked: 514 times

Re: MULTICHARTS 10.0 BETA 1

Postby arnie » 19 Jul 2016

Hello,

I've created an indicator that looks like bookmap, i'm currently using point style to plot the indicator. Is it possible to add square or rectangle styles in future versions of MC. I've tried left tick and right tick but they aren't centered.

Image

Thx
Nice work!

Have you tried plotting left and right tick at the same time?

mickatrade
Posts: 114
Joined: 12 Jul 2015
Has thanked: 20 times
Been thanked: 16 times

Re: MULTICHARTS 10.0 BETA 1

Postby mickatrade » 19 Jul 2016

It's actually not possible arnie.

User avatar
arnie
Posts: 1594
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 481 times
Been thanked: 514 times

Re: MULTICHARTS 10.0 BETA 1

Postby arnie » 19 Jul 2016

It's actually not possible arnie.
Yes it is, duplicate your plots.
One plot the left tick, the other plot the right tick.
Sure, not the best practice but the only one available to us at he moment

mickatrade
Posts: 114
Joined: 12 Jul 2015
Has thanked: 20 times
Been thanked: 16 times

Re: MULTICHARTS 10.0 BETA 1

Postby mickatrade » 19 Jul 2016

Ok thanks for your advice, but it s not elegant :) and my cpu will cry.

User avatar
arnie
Posts: 1594
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 481 times
Been thanked: 514 times

Re: MULTICHARTS 10.0 BETA 1

Postby arnie » 19 Jul 2016

Ok thanks for your advice, but it s not elegant :) and my cpu will cry.
What we need would be a step line but so far no such luck :(

I believe that only the memory would be affected by the extra plots, not the CPU since you're not doing any extra calculation though I can be wrong.

SP
Posts: 465
Joined: 06 Feb 2006
Has thanked: 36 times
Been thanked: 286 times

Re: bookmap

Postby SP » 19 Jul 2016

Instead of plotting a dot with
Plot1 ( close , "Bid") ;
you could simple use two plots with
Plot1 ( close , "Bid") ;
Plot2 ( close + 0.25 , "Bid") ;
and format plot1 as Bar High and plot2 as Bar Low.


PS:
I cant upload an image, it says "Sorry, the board attachment quota has been reached."

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: bookmap

Postby Henry MultiСharts » 20 Jul 2016

I cant upload an image, it says "Sorry, the board attachment quota has been reached."
Hello SP,

You should be able to upload images now.

mickatrade
Posts: 114
Joined: 12 Jul 2015
Has thanked: 20 times
Been thanked: 16 times

Re: bookmap

Postby mickatrade » 22 Jul 2016

Instead of plotting a dot with
Plot1 ( close , "Bid") ;
you could simple use two plots with
Plot1 ( close , "Bid") ;
Plot2 ( close + 0.25 , "Bid") ;
and format plot1 as Bar High and plot2 as Bar Low.


PS:
I cant upload an image, it says "Sorry, the board attachment quota has been reached."
Hello SP,
Thank you for your anwser, i will try it next week. Can you send upload your image please ?

MJ

SP
Posts: 465
Joined: 06 Feb 2006
Has thanked: 36 times
Been thanked: 286 times

Re: bookmap

Postby SP » 23 Jul 2016

As example.
Attachments
Plot12.jpg
(144.71 KiB) Downloaded 4331 times

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: MULTICHARTS 10.0 BETA 1

Postby bensat » 25 Jul 2016

Ok thanks for your advice, but it s not elegant :) and my cpu will cry.
You can save a lot of memory and cpu utilization by adjusting the background of the chart to the base level of your base color in the study and only plot levels which are 'worth' to show ...

One example from my indicator :

Image

I just don't know what you mean by saying 'centered plot'. Please can you explain it for me ... Until you don't want to sell your indicator, whats the point for a 'perfect' centered plot. I see your plots exactly at the price. Further your chart looks like to be a snapshot of the 'orderbook' conditions only and not plotting the real state ... What about further analysis from the history ? Do you record the current state in a db or so ? Thank you in advance.

Regards

Ben

Ranfotto
Posts: 10
Joined: 10 Oct 2013
Has thanked: 7 times
Been thanked: 2 times

Re: bookmap

Postby Ranfotto » 25 Jul 2016

Hi there, can someone (bensat or mickatrade or anyone else) post the code of bookmap indicator posted in this topic or if not the definitive code, a basic code to start a development based on that code ?
I'm interesting in BookMap but I've a Multicharts easylanguage licence and not a .NET licence which works with Bookmap original software.
Many Thanks in advance

mickatrade
Posts: 114
Joined: 12 Jul 2015
Has thanked: 20 times
Been thanked: 16 times

Re: MULTICHARTS 10.0 BETA 1

Postby mickatrade » 25 Jul 2016

Ok thanks for your advice, but it s not elegant :) and my cpu will cry.
You can save a lot of memory and cpu utilization by adjusting the background of the chart to the base level of your base color in the study and only plot levels which are 'worth' to show ...

One example from my indicator :

Image

I just don't know what you mean by saying 'centered plot'. Please can you explain it for me ... Until you don't want to sell your indicator, whats the point for a 'perfect' centered plot. I see your plots exactly at the price. Further your chart looks like to be a snapshot of the 'orderbook' conditions only and not plotting the real state ... What about further analysis from the history ? Do you record the current state in a db or so ? Thank you in advance.

Regards

Ben
hi Ben,
You can plot data with, dots, left tick, right tick, line etc ...
See the picture below.
Attachments
rightlefttick.PNG
(118.17 KiB) Downloaded 4310 times

mickatrade
Posts: 114
Joined: 12 Jul 2015
Has thanked: 20 times
Been thanked: 16 times

Re: bookmap

Postby mickatrade » 25 Jul 2016

Hi there, can someone (bensat or mickatrade or anyone else) post the code of bookmap indicator posted in this topic or if not the definitive code, a basic code to start a development based on that code ?
I'm interesting in BookMap but I've a Multicharts easylanguage licence and not a .NET licence which works with Bookmap original software.
Many Thanks in advance
Hello Ranfotto,
I currently want to sell the indicators, as i spent lot of hours developping the indicator. So i won't share the code. It's available for a small fee, please PM if you are interested.

Regards
Attachments
example2.PNG
(195.81 KiB) Downloaded 4306 times

Ranfotto
Posts: 10
Joined: 10 Oct 2013
Has thanked: 7 times
Been thanked: 2 times

Re: bookmap

Postby Ranfotto » 26 Jul 2016

Hi there, can someone (bensat or mickatrade or anyone else) post the code of bookmap indicator posted in this topic or if not the definitive code, a basic code to start a development based on that code ?
I'm interesting in BookMap but I've a Multicharts easylanguage licence and not a .NET licence which works with Bookmap original software.
Many Thanks in advance
Hello Ranfotto,
I currently want to sell the indicators, as i spent lot of hours developping the indicator. So i won't share the code. It's available for a small fee, please PM if you are interested.

Regards
OK Thanks !! I will try myself and if I fail I will contact you for your work
My congratulations for your good work

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: bookmap

Postby bensat » 26 Jul 2016


... I currently want to sell the indicators, as i spent lot of hours developping the indicator. So i won't share the code. It's available for a small fee, please PM if you are interested.
.... Good luck for future developments and I hope nobody is sharing a simple base code of this very simple idea, which would kill your 'sale' idea .... with this kind of behavior.

Regards

Ben

mickatrade
Posts: 114
Joined: 12 Jul 2015
Has thanked: 20 times
Been thanked: 16 times

Re: bookmap

Postby mickatrade » 26 Jul 2016

Ok ben,
You re free to share your own code , i will not judge ...

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

Re: bookmap

Postby TJ » 26 Jul 2016

Hi there, can someone (bensat or mickatrade or anyone else) post the code of bookmap indicator posted in this topic or if not the definitive code, a basic code to start a development based on that code ?
I'm interesting in BookMap but I've a Multicharts easylanguage licence and not a .NET licence which works with Bookmap original software.
Many Thanks in advance
In your PowerLanguage Editor there is an indicator called "--- Market Depth ---".

You can use that as the base for your "Bookmap";
you can re-code the indicator to plot dots on every bar instead of horizontal lines at the edge of the screen.


It is not rocket science or esoteric breakthrough, but it does require some coding effort.

Ranfotto
Posts: 10
Joined: 10 Oct 2013
Has thanked: 7 times
Been thanked: 2 times

Re: bookmap

Postby Ranfotto » 26 Jul 2016

In your PowerLanguage Editor there is an indicator called "--- Market Depth ---".

You can use that as the base for your "Bookmap";
you can re-code the indicator to plot dots on every bar instead of horizontal lines at the edge of the screen.

It is not rocket science or esoteric breakthrough, but it does require some coding effort.
thanks TJ, this is my first attemt based on the indicator mentioned by you few hours ago --- Market depth on chart---

Many many thanks
Image
Image

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

Re: bookmap

Postby TJ » 26 Jul 2016

In your PowerLanguage Editor there is an indicator called "--- Market Depth ---".

You can use that as the base for your "Bookmap";
you can re-code the indicator to plot dots on every bar instead of horizontal lines at the edge of the screen.

It is not rocket science or esoteric breakthrough, but it does require some coding effort.
thanks TJ, this is my first attemt based on the indicator mentioned by you few hours ago --- Market depth on chart---

Many many thanks
Image
Image
Wow that was quick.

Nice work.

User avatar
arnie
Posts: 1594
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 481 times
Been thanked: 514 times

Re: bookmap

Postby arnie » 26 Jul 2016

great job guys.

now you need to extend to the right side all depths so you can have the sense if those prior high volume, for example, at 121.09, is still there a couple of hours later when prices get back at it.

Image
Attachments
bookmap.jpg
(190.81 KiB) Downloaded 4645 times

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: bookmap

Postby bensat » 26 Jul 2016

looking gooooood 'Ranfotto' ... well done

Regards

Ben

Ranfotto
Posts: 10
Joined: 10 Oct 2013
Has thanked: 7 times
Been thanked: 2 times

Re: bookmap

Postby Ranfotto » 26 Jul 2016

looking gooooood 'Ranfotto' ... well done

Regards

Ben
Many Thanks 'bensat'

mickatrade
Posts: 114
Joined: 12 Jul 2015
Has thanked: 20 times
Been thanked: 16 times

Re: bookmap

Postby mickatrade » 26 Jul 2016

In your PowerLanguage Editor there is an indicator called "--- Market Depth ---".

You can use that as the base for your "Bookmap";
you can re-code the indicator to plot dots on every bar instead of horizontal lines at the edge of the screen.

It is not rocket science or esoteric breakthrough, but it does require some coding effort.
thanks TJ, this is my first attemt based on the indicator mentioned by you few hours ago --- Market depth on chart---

Many many thanks
Image
Image
Great job!!!

mickatrade
Posts: 114
Joined: 12 Jul 2015
Has thanked: 20 times
Been thanked: 16 times

Re: bookmap

Postby mickatrade » 26 Jul 2016

So nobody has a solution for my initial issue?

hendrix
Posts: 54
Joined: 27 Dec 2013
Has thanked: 21 times
Been thanked: 5 times

Re: bookmap

Postby hendrix » 27 Jul 2016

Hello

Ranfotto and Mick, congratulations for your work. Technically, do you think it would be possible to display the order quantity for each period? (for a precise historical)

@Mick > I'm less talented than you to code, but if it can give you an idea... Have you thought of using letters, and especially the Wingdings2 font characters to display square ?

https://en.wikipedia.org/wiki/Wingdings

User avatar
CrazyNasdaq
Posts: 318
Joined: 02 Sep 2009
Location: ITALY
Has thanked: 97 times
Been thanked: 86 times

Re: bookmap

Postby CrazyNasdaq » 27 Jul 2016

Hello
@Mick > I'm less talented than you to code, but if it can give you an idea... Have you thought of using letters, and especially the Wingdings2 font characters to display square ?

https://en.wikipedia.org/wiki/Wingdings
Basicly (but I could be wrong) you can't use gradient color with letters. BookMap needs gradient colors

mickatrade
Posts: 114
Joined: 12 Jul 2015
Has thanked: 20 times
Been thanked: 16 times

Re: bookmap

Postby mickatrade » 27 Jul 2016

Hello

Ranfotto and Mick, congratulations for your work. Technically, do you think it would be possible to display the order quantity for each period? (for a precise historical)

@Mick > I'm less talented than you to code, but if it can give you an idea... Have you thought of using letters, and especially the Wingdings2 font characters to display square ?

https://en.wikipedia.org/wiki/Wingdings
Hello Hendrix,
Good idea, but as CrazyNasdaq said, i should see first if gradient color is available for text.
For your question about the quantity, i can already show/hide it on my indicator( see attached file).
The problem is, numbers are centered only on dot plots :D.
Numbers are truncated when i use left tick or right tick plot, my initial issue.
quant1.png
(23.91 KiB) Downloaded 4308 times


Regards
Attachments
quant2.png
(18.89 KiB) Downloaded 4300 times

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: bookmap

Postby bensat » 27 Jul 2016

If course you can set synthetic 'gradient' colors with text ...

You just have to define every 'book level' and keep it separated all the way. My screenshot is a good example for it. But it's not compliant with the standard 'Marketdepth'-study and you won't be able to show 'significant' book-levels only, which saves a lot of resources.

My Regards.

Ben

User avatar
CrazyNasdaq
Posts: 318
Joined: 02 Sep 2009
Location: ITALY
Has thanked: 97 times
Been thanked: 86 times

Re: bookmap

Postby CrazyNasdaq » 27 Jul 2016

great job guys.

now you need to extend to the right side all depths so you can have the sense if those prior high volume, for example, at 121.09, is still there a couple of hours later when prices get back at it.

Image
In my opinion, theoretically, the only way to extend to the right the past book levels is using Trendlines. If this is the way, the question is: "How many trend lines can handle Multicharts in a single chart?"
The indicator should handle hundreds of trend lines each session

Ranfotto
Posts: 10
Joined: 10 Oct 2013
Has thanked: 7 times
Been thanked: 2 times

Re: bookmap

Postby Ranfotto » 27 Jul 2016

In my opinion, theoretically, the only way to extend to the right the past book levels is using Trendlines. If this is the way, the question is: "How many trend lines can handle Multicharts in a single chart?"
The indicator should handle hundreds of trend lines each session
Not so simple to code such indicator through trend lines !!

User avatar
arnie
Posts: 1594
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 481 times
Been thanked: 514 times

Re: bookmap

Postby arnie » 27 Jul 2016

In my opinion, theoretically, the only way to extend to the right the past book levels is using Trendlines. If this is the way, the question is: "How many trend lines can handle Multicharts in a single chart?"
The indicator should handle hundreds of trend lines each session
Why trendlines?
Why not the left/right tick?
Extending to the right don't mean extend literally to the right, beyond the last bar.
Extending past levels to the last bar allows to use the left/right tick, which makes the study more light on the CPU and memory.
Or even using bar high/low which would create a channel like for each price level

User avatar
CrazyNasdaq
Posts: 318
Joined: 02 Sep 2009
Location: ITALY
Has thanked: 97 times
Been thanked: 86 times

Re: bookmap

Postby CrazyNasdaq » 28 Jul 2016

Why trendlines?
Why not the left/right tick?
Extending to the right don't mean extend literally to the right, beyond the last bar.
Extending past levels to the last bar allows to use the left/right tick, which makes the study more light on the CPU and memory.
Or even using bar high/low which would create a channel like for each price level
To extend to the right a past DOM level to the last bar using left/right tick means create a syntetich bar for each past DOM level for each past bar occurred till now, even if the price close is far from the actual level.
Left/Right tick works only for a single point/bar

User avatar
CrazyNasdaq
Posts: 318
Joined: 02 Sep 2009
Location: ITALY
Has thanked: 97 times
Been thanked: 86 times

Re: Bookmap

Postby CrazyNasdaq » 05 Aug 2016

I'm coding Bookmap with past levels through trend lines and the result seems to works fine, but there is a problem which could be a big problem. Trend Lines plot each line over the price fields (Open, High, Low, Close) so the basic logic with left/right tick and the price bar disappears behind the past trend lines. Is there a way to plot trend lines in background and keep price bars and each DOM level as primary layer ?

Trend Lines cover all on the chart, even some levels of Market Depth On chart indicator, even if I set Price fields as "bring to front" or "bring Forward" in the visual order menu setting.
if Not, trend lines are not the way to plot past BookMap Levels

Image

Image

mickatrade
Posts: 114
Joined: 12 Jul 2015
Has thanked: 20 times
Been thanked: 16 times

Re: Bookmap

Postby mickatrade » 06 Aug 2016

Maybe you should try additionnal plots instead of trendlines.
When your historical level is inside your current dom level range, use noplot code for the historical level, if not, plot the historical level .

MJ

User avatar
CrazyNasdaq
Posts: 318
Joined: 02 Sep 2009
Location: ITALY
Has thanked: 97 times
Been thanked: 86 times

Re: Bookmap

Postby CrazyNasdaq » 07 Aug 2016

Maybe you should try additionnal plots instead of trendlines.
When your historical level is inside your current dom level range, use noplot code for the historical level, if not, plot the historical level .

MJ
The problem is that if you use dots or Left/right tick after a Plot condition ( "When your historical level is inside your current dom level range, use noplot code for the historical level, if not, plot the historical level ") you have "only" 999 Plot possibility and you have to declare and code each one of 999 Plots. It could appear that 999 possibility are enough but if you must plot each one for each 20 levels of DOM (10 per side) on every new condition that don't match the condition before, this for every new tick different from the tick before where DOM levels are new levels, 999 Plots will terminate in few ticks of historical prices.
Then there is a logic that is not less important as it could appear. DOM levels (DOM_ASkPrice, DOM_AskSize, DOM_BidPrice, DOM_BidSize) don't work with historical reference as Close[1] (the close before, ecc.....) because they don't have historical quotes collected, so the code can't consider them in a logic reference. This way, that's not so simple to do to create historical view of BookMap with left/right tick which forcedly work on every point level for every single plot till last date time.

Ranfotto
Posts: 10
Joined: 10 Oct 2013
Has thanked: 7 times
Been thanked: 2 times

Re: Bookmap

Postby Ranfotto » 07 Aug 2016

I'm coding Bookmap with past levels through trend lines and the result seems to works fine, but there is a problem which could be a big problem. Trend Lines plot each line over the price fields (Open, High, Low, Close) so the basic logic with left/right tick and the price bar disappears behind the past trend lines. Is there a way to plot trend lines in background and keep price bars and each DOM level as primary layer ?

Trend Lines cover all on the chart, even some levels of Market Depth On chart indicator, even if I set Price fields as "bring to front" or "bring Forward" in the visual order menu setting.
if Not, trend lines are not the way to plot past BookMap Levels

Image

Image
Good Work CrazyNasdaq and many compliments, but BAD News to hear by you about trend lines above price bars.

mickatrade
Posts: 114
Joined: 12 Jul 2015
Has thanked: 20 times
Been thanked: 16 times

Re: Bookmap

Postby mickatrade » 07 Aug 2016

The problem is that if you use dots or Left/right tick after a Plot condition ( "When your historical level is inside your current dom level range, use noplot code for the historical level, if not, plot the historical level ") you have "only" 999 Plot possibility and you have to declare and code each one of 999 Plots.
Ok i see , but i think you should plot only historical levels that matter ( price level with big quantity of orders) and you can dedicate 1 plot for historical big bid level and 1 plot for historical big ask level . Then you have to define the logic to detect and store a historical price/size couple for the bid and the same for historical ask.

User avatar
CrazyNasdaq
Posts: 318
Joined: 02 Sep 2009
Location: ITALY
Has thanked: 97 times
Been thanked: 86 times

Re: Bookmap

Postby CrazyNasdaq » 07 Aug 2016

Ok i see , but i think you should plot only historical levels that matter ( price level with big quantity of orders) and you can dedicate 1 plot for historical big bid level and 1 plot for historical big ask level . Then you have to define the logic to detect and store a historical price/size couple for the bid and the same for historical ask.
It could be an idea, but it would be a proxy of BookMap and it would also have more then a single level of significant bid and more then one single level of significant ask, specially if the market is directional and in trend. Filter and plotting only significant levels of DOM will reduce the numbers of Plots, but not to one single specific and significant Ask or one single specific and significant Bid because you could have more then one significant level per side and using left/right tick means to have for each significant level a single redundant plot to last date time. I repeat myself, using Left/right tick in coding means to have Plot"N" for each significant level, which could be repeat till last bar, but you must have N plots for each N levels. Coding this, puts you in front of a question: How Many Plots can you have and How Many plots can you pre assign in the code ? You can't Know this before
maybe a solution could be to plot only the last N significant levels.
A Very best solution should be if Multicharts could do what now is impossible to do and what I've requested in this PM http://www.multicharts.com/pm/viewissue ... no=MC-2083

Nick
Posts: 496
Joined: 04 Aug 2006
Has thanked: 4 times
Been thanked: 24 times

Re: Bookmap

Postby Nick » 22 Aug 2016

So nobody has a solution for my initial issue?
I would try having two plots one tick apart and plot a high low style with the thickness adjusted to be solid. I seem to remember hilo plots have a rounded end when they are thick though which might be a problem.

So if the book is above the market at 23.25 inside bid I would plot 23.25 to 23.50 as a high low. Below the market if it was at say 23 I would plot 23 to 22.75 as a high low bar.

Is anyone sharing any code? There seems to be lots of overlapping effort where a collaborative effort is likely to produce better results? Having said that I usually write from scratch but wanted to see if this would really be actually useful live before expending effort.

Nick
Posts: 496
Joined: 04 Aug 2006
Has thanked: 4 times
Been thanked: 24 times

Re: Bookmap

Postby Nick » 22 Aug 2016

Does an order book change cause an indicator to be recalculated? One of the uses of this sort of analytic is to see orders being pulled. That often happens when aggressive orders have dried up and price is 'hanging' without actual trades going off especially on thinner markets. Not sure if this would be a deal breaker for me? probably. I seem to remember bid and ask changes only cause indicators to calculate if they are assigned to dataN and dataM.

This is another area where some sort of event driven implementation would probably be best I think? Unless I am mistaken (quite likely!) you need to loop through the whole order book on each tick to get current values? Really you want an event to trigger your indicator and then something that can be read tell you what the event was. Finally you need to be able read that actual value that changed.


Return to “MultiCharts”