Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to have OHLC chart as Addplot? #168

Closed
luongjames8 opened this issue Jun 12, 2020 · 8 comments
Closed

Possible to have OHLC chart as Addplot? #168

luongjames8 opened this issue Jun 12, 2020 · 8 comments
Labels
enhancement New feature or request question Further information is requested released code merged into repo AND released to Pypi

Comments

@luongjames8
Copy link

luongjames8 commented Jun 12, 2020

Hi - this is a great package. Thanks for the work on it.

Is it possible to have two ohlc plots? I've setup an ohlc chart on panel 0. But when I try to create an ohlc chart on panel1, I get an error that there's no candle type on the addplot?

Is the ohlc limited to main chart in panel 0?

Sorry if I missed it in the documentation somewhere.

C:\ProgramData\Anaconda3\lib\site-packages\mplfinance\plotting.py in make_addplot(data, **kwargs)
    735         raise TypeError('Wrong type for data, in make_addplot()')
    736 
--> 737     config = _process_kwargs(kwargs, _valid_addplot_kwargs())
    738 
    739     # kwarg `type` replaces kwarg `scatter`

C:\ProgramData\Anaconda3\lib\site-packages\mplfinance\_arg_validators.py in _process_kwargs(kwargs, vkwargs)
    230                 import inspect
    231                 v = inspect.getsource(vkwargs[key]['Validator']).strip()
--> 232                 raise TypeError('kwarg "'+key+'" validator returned False for value: "'+str(value)+'"\n    '+v)
    233 
    234        # ---------------------------------------------------------------

TypeError: kwarg "type" validator returned False for value: "candle"
    'Validator'   : lambda value: value in valid_types },

@luongjames8 luongjames8 added the question Further information is requested label Jun 12, 2020
@luongjames8
Copy link
Author

Bump.

Anyone can comment here? Is a second candle chart not allowed on panel 2? Or is there a simple fix?

@DanielGoldfarb
Copy link
Collaborator

It's not yet possible to have more than one panel of ohlc/candle. Coming soon ... maybe a month or so.

@luongjames8
Copy link
Author

Thank you Daniel for the response 👍

@DanielGoldfarb DanielGoldfarb added enhancement New feature or request in progress released code merged into repo AND released to Pypi and removed in progress labels Jun 24, 2020
@DanielGoldfarb
Copy link
Collaborator

pip install --upgrade mplfinance

@luongjames8
Copy link
Author

Works! Thank you!!!!

@Johnnee
Copy link

Johnnee commented Nov 4, 2023

hi I got same issue, can new version add another ohlc plots? how to write it

@DanielGoldfarb
Copy link
Collaborator

@Johnnee ... yes this works, as indicated above as of June 24, 2020, just use mpf.make_addplot() to create additional OHLC or Candle charts in other panels (or on the same panel). See, for example, In [23] in https://github.com/matplotlib/mplfinance/blob/master/examples/addplot.ipynb

@Johnnee
Copy link

Johnnee commented Nov 5, 2023

@Johnnee ... yes this works, as indicated above as of June 24, 2020, just use mpf.make_addplot() to create additional OHLC or Candle charts in other panels (or on the same panel). See, for example, In [23] in https://github.com/matplotlib/mplfinance/blob/master/examples/addplot.ipynb

Thanks, amazing work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested released code merged into repo AND released to Pypi
Projects
None yet
Development

No branches or pull requests

3 participants