-
Notifications
You must be signed in to change notification settings - Fork 982
Closed
Description
after plotting this code:
Random rand = new Random(0);
double[] xs = DataGen.Consecutive(150);
OHLC[] ohlcs = DataGen.RandomStockPrices(rand, xs.Length);
(var sma, var bolL, var bolU) = ScottPlot.Statistics.Finance.Bollinger(ohlcs);
// replace timestamps with a series of numbers starting at 0xs
for (int i = 0; i < ohlcs.Length; i++)
ohlcs[i].time = i;
var plt = new ScottPlot.Plot(600, 400);
plt.PlotCandlestick(ohlcs);
plt.PlotFill(xs, bolU, xs, bolL, "bollinger", 1, Color.Black, true, Color.Aqua, 0.3);
plt.PlotScatter(xs, sma, color: Color.Blue, markerSize: 0, lineStyle: LineStyle.Dash);How we update it by adding one new candle and corresponding bollinger bands values?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels