From fe4df654f7f3f6428756edd47e982e941252e779 Mon Sep 17 00:00:00 2001 From: Cosmin Sanda Date: Tue, 27 Sep 2022 20:58:50 +0200 Subject: [PATCH] demo --- demo.dib | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 demo.dib diff --git a/demo.dib b/demo.dib new file mode 100644 index 0000000..3172ae3 --- /dev/null +++ b/demo.dib @@ -0,0 +1,35 @@ +#!markdown + +#### Install the latest version of the package + +#!csharp + +#r "nuget: CosminSanda.Finance" +#r "nuget: ScottPlot" +#r "nuget: ScottPlot.DataGen" + +#!csharp + +using System.Linq; +using CosminSanda.Finance; + +#!csharp + +var earnings = await EarningsCalendar.GetPastEarningsDates("TWTR"); + +#!csharp + +earnings.TakeLast(4) + +#!csharp + +using Microsoft.DotNet.Interactive.Formatting; + +Formatter.Register(typeof(ScottPlot.Plot), (plt, writer) => + writer.Write(((ScottPlot.Plot)plt).GetImageHTML()), HtmlFormatter.MimeType); + +#!csharp + +var plt = new ScottPlot.Plot(600, 400); + +plt.AddCandlesticks(prices);