-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Labels
BUGunexpected behaviorunexpected behavior
Description
Hi,
I used the scottplot on my own project. there was dynamic candlestick and SMA lines. dynamic candlesticks working good but SMA lines does not calculated and showed as expected. SMA lines working good on first load but when the new candlesticks was added SMA graphics are incorrect like below. I couldn't find a solution to fix this SMA or Bollinger graphics. could this be an issue or am i doing something wrong?
//definition
private List <OHLC> grafik;
private FinancePlot mcp;
private ScatterPlot scp20;
// first load
mcp = formsPlot1.Plot.AddCandlesticks(grafik.ToArray());
var (xs, ys) = mcp.GetSMA(20);
scp20 = formsPlot1.Plot.AddScatterLines(xs, ys, Color.LightCoral, 1);
// timer
grafik.Add(ohlc);
if (scp20 != null) formsPlot1.Plot.Remove(scp20);
var (xs, ys) = mcp.GetSMA(20);
scp20 = formsPlot1.Plot.AddScatterLines(xs, ys, Color.LightCoral, 1);
formsPlot1.Refresh();
System Details
- ScottPlot Version: 4.1.58
- Operating System: Windows 10
- Application Type: WinForms
- .NET Version: .NET 6.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BUGunexpected behaviorunexpected behavior
