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

Markers doesnt point to the correct level of buy/sell on the y axis (with positioning inBar) #636

Closed
lotusjohn opened this issue Dec 6, 2020 · 5 comments

Comments

@lotusjohn
Copy link

lotusjohn commented Dec 6, 2020

Lightweight Charts Version: 3.1.5

Steps/code to reproduce:
Having this issue with all my buy/sell markers but it is also the case in the jsFiddle of tradingView.
https://jsfiddle.net/TradingView/nd80cx1a/

Actual behavior:
Markers are shown with the arrow pointing at about 73.50 when the sell was at 75 for ex. Removing the text and/or changing to position "inBar" doesnt help either.
The arrow doesnt point to the correct pricelevel no matter what positioning is used, isBar makes the marker even more off from the actual sell/buy price.
For day/swing trades, this makes it very unusable since all the arrows are completely off, and just looking at the chart could give the impression that the trade was for ex a loss, but reading the markers text, or checking trade details one sees it actually was a profitable trade.

Expected behavior:
Arrows should point correctly at the pricelevel of buy/sell. The down-tip of the arrowDown should be placed at the price-level of the sell. The upwards tip of the arrowUp should be placed at the pricelevel of the buy.

I expect the arrow to point to the correct price level if positioning is "inBar", or expect that there would be another positioning option that would make the marker handle this case.

Screenshots:
inBar:
image

aboveBar (makes sense for this positioning option)
image

CodeSandbox/JSFiddle/etc link:
https://jsfiddle.net/TradingView/nd80cx1a/

@timocov
Copy link
Contributor

timocov commented Dec 7, 2020

The arrow doesnt point to the correct pricelevel no matter what positioning is used, isBar makes the marker even more off from the actual sell/buy price.

Series' markers aren't made to highlight a specific price level, they even don't have price property in their options. They are pointing a bar where something was happened and sometimes a side where this happened (it might be used in several conditions, e.g. for trades it might show whether it's buy or sell trade).

Arrows should point correctly at the pricelevel of buy/sell. The down-tip of the arrowDown should be placed at the price-level of the sell. The upwards tip of the arrowUp should be placed at the pricelevel of the buy.

See #127

@timocov
Copy link
Contributor

timocov commented Feb 1, 2021

I'm going to close the issue. If you'll have any question or updates - feel free to re-open it.

@timocov timocov closed this as completed Feb 1, 2021
@fillky
Copy link

fillky commented Dec 14, 2022

The nice workaround to achieve having markers on exact price level would be to create a line series with full transparent color and then setting markers on the "invisible line series" instead of candlesticks series. By doing this markers would point to your desired price level.

@fillky
Copy link

fillky commented Dec 15, 2022

Code snippet of workaround mentioned.

@maximbelyayev
Copy link

I really think introducing a marker with a price level or y-coordinate is of utmost importance. A lot of charting use-cases would be solved with lightweight-charts as a result.

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

No branches or pull requests

4 participants