bfolkens / py-market-profile

A library to calculate Market Profile (aka Volume Profile) for financial data from a Pandas DataFrame.
Other
353 stars 122 forks source link

Guidance on how to plot the MP data #9

Closed sidsidsidsid closed 4 years ago

sidsidsidsid commented 4 years ago

Great code! I have searched for a good Market Profile API. I like how you have created a simple interface to retrieve Market Profile basis. I like that you haven't comingled plotting code with your source code which outputs just data. I see some examples of MP code that has plotting code in it.

I have two questions:

[1] What is the below git site? Is it related to your work? https://github.com/beinghorizontal/py-market-profile

[2] I'm having trouble with overlaying your MP data onto a candlestick chart using Bohek python plotting library. I would like to place an MP plot around a particular DateTime area of the candlestick chart. For example, I would select an area on the candlestick chart and the MP plot would appear. This is similar to the different charting services. NOTE this is not an issue with your API, but wondering if you have any guidance on plotting.

Thanks

bfolkens commented 4 years ago

Hi @sidsidsidsid

  1. looks like that's one of the forks of this codebase.
  2. I'm not too familiar with Bokeh, but I can imagine there might be some sort of customization on the X axis that you could play with. In particular, the spacing of the ticks, which would leave you space for overlaying the MP data on top of it. There are a few different ways to plot MP data (some inspiration here in d3.js): https://blog.scottlogic.com/2017/08/23/market-profile.html