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

SL and TP line #389

Open
anncoin opened this issue May 4, 2021 · 3 comments
Open

SL and TP line #389

anncoin opened this issue May 4, 2021 · 3 comments
Labels
question Further information is requested

Comments

@anncoin
Copy link

anncoin commented May 4, 2021

Good morning, I'm something new using the mplfinance library .... is there a way to draw a line on the graph to identify the SL and TP calculated in% by the closing of the last bar?

@anncoin anncoin added the question Further information is requested label May 4, 2021
@DanielGoldfarb
Copy link
Collaborator

DanielGoldfarb commented May 5, 2021

You will want to use the hlines kwarg, explained here: https://github.com/matplotlib/mplfinance/blob/master/examples/using_lines.ipynb

However you will have to calculate the values yourself and pass them into mpf.plot() using the hlines kwarg.

Hope that helps.

@anncoin
Copy link
Author

anncoin commented May 5, 2021

thank you very much, i will try

@fxhuhn
Copy link
Contributor

fxhuhn commented Dec 18, 2021

ice_aapl_us
i did it already. SL is the red line, and TP1/2 are the blue ones. Was this similar to your idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants