Marker on wrong candle
See original GitHub issue
In the screenshot you can see I have a square marker (position logged in the console) 1665655200 '2022-10-13 10:00:00'
The chart candles are 4 hours. However, after pushing and setting the marker, it’s in the wrong position.
The marker has timestamp 2022-10-13 10:00:00
(converted to unix) so surely it should fall into the prior candlestick (08:00-12:00)? Instead it’s in the candlestick that starts from 12:00!
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Candlestick chart add_trace(mode="markers") gives wrong ...
I'm currently building a financial dashboard with dash and plotly. I added the following candlestick chart to my dashboard ...
Read more >Add a number or a symbol above/below a candle chart with ...
Hi, is there a way to add on top of a day candle a number ('1', '2', ... It seems to me (please...
Read more >Wrong buy & sell markers on chart - NinjaTrader Support Forum
Problem: using a 4range chart shows (sometimes) the buy/sell arrow at the wrong candle and sometimes at a place where no bar is...
Read more >6 Mistakes New Candle Makers Should Avoid
1. Putting the wrong amount of fragrance oil · 2. Using the same wick size for every scent · 3. Burning the candle...
Read more >Candlestick charts - Google Docs Editors Help
Use a candlestick chart to show the low, high, opening, and closing values of a security for a specific period. For example, get...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My formula above fixes the issues because it takes a
markerUnixTime
which is already some opening time of some interval and rounds it to some interval you are displaying in your chart, plotting it at the correct open position.Also, if you want to compare with TD, make sure your timezone is the same between your local and TD. In my case I set my TD timezone to UTC for testing, to match my local implementation.
Lightweight charts will show the date and time that you assign to
time
value of the data point, it’s different to how it works on TV because those charts use a specific resolution (say1H
). A lightweight chart doesn’t ‘fix’ your timestamps or require that the data points have regular time gaps.Here is an example with bar with different time intervals between them. Notice that the time scale isn’t ‘linear’. https://jsfiddle.net/msilverwood/bhLoxp9g/