-
-
Notifications
You must be signed in to change notification settings - Fork 687
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
Candlestick series bug with small timeframe #386
Comments
There seems to be some drift in float interpretation between python and the series api. Even with large time frames, the klines don't sit on grid-lines when their values should match exactly. When the time frames are small, the issue compounds, and gets to a point where k-lines are overlapping, in the wrong place entirely. Some candlesticks get drawn on top of each other even if the date given to them is verifiable as different. In the attached diagram, 1615905900 is being passed as a float list to the series, and while the x-axis can cope with this interval nicely, the candlesticks all have precision drift. |
Is there some way around this? |
Not yet. We are working on this issue for 0.7 |
Nice! Thanks for reply and the good work you guys are doing! =) |
Can we confirm this is present in 0.8? |
UPDATE: dates = df['date'].to_numpy()
min_dates = min(dates)
max_dates = max(dates)
opens = df['open'].to_numpy()
highs = df['high'].to_numpy()
max_highs = max(highs)
lows = df['low'].to_numpy()
min_lows = min(lows)
closes = df['close'].to_numpy()
with window(label="Trader", width=500, height=500, pos=[0, 0]) as main_window:
with plot(label="Candles Plot", width=-1, height=-1) as plot_id:
add_plot_legend()
add_plot_axis(mvXAxis, label="Dates", time=True)
set_axis_limits(last_item(), min_dates, max_dates)
add_plot_axis(mvYAxis, label="Prices")
set_axis_limits(last_item(), min_lows, max_highs)
add_candle_series(dates=dates, opens=opens, highs=highs, lows=lows, closes=closes, label="Candlesticks",
parent=last_item())
set_primary_window(main_window, True)
start_dearpygui() |
If I can suggest some improvements:
|
Version of Dear PyGui:
Version: 0.6.42
OS
Operating System: Windows 10
My Issue/Question
I can't have a good looking Candlestick series in 1 minute timeframe.
Candles seems to be bugged, don't really understand why.
Screenshots/Video
Configuration plot are the same, the source of data is checked. Is there something i forget ? Like a parameter to set or somethin else ?
Portion of code :
The text was updated successfully, but these errors were encountered: