You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letdateData= data |> Frame.getCol "Date"|> Series.values |> Seq.map System.DateTime.Parse
49
+
50
+
(**
51
+
An open-high-low-close chart (also OHLC) is a type of chart typically used to illustrate movements in the price of a financial instrument over time.
52
+
Each vertical line on the chart shows the price range (the highest and lowest prices) over one unit of time.
53
+
Tick marks project from each side of the line indicating the opening price (e.g., for a daily bar chart this would be the starting price for that day) on the left, and the closing price for that time period on the right.
54
+
The bars may be shown in different hues depending on whether prices rose or fell in that period.
55
+
56
+
You can create an OHLC chart using `Chart.OHLC`:
57
+
*)
58
+
59
+
openPlotly.NET
60
+
openPlotly.NET.TraceObjects
61
+
62
+
letohlc1=
63
+
Chart.OHLC(
64
+
openData |> Seq.take 30,
65
+
highData |> Seq.take 30,
66
+
lowData |> Seq.take 30,
67
+
closeData |> Seq.take 30,
68
+
dateData |> Seq.take 30
69
+
)
70
+
71
+
(*** condition: ipynb ***)
72
+
#if IPYNB
73
+
ohlc1
74
+
#endif// IPYNB
75
+
76
+
(***hide***)
77
+
ohlc1 |> GenericChart.toChartHTML
78
+
(***include-it-raw***)
79
+
80
+
(**
81
+
## Changing the increasing/decresing colors
82
+
*)
83
+
84
+
letohlc2=
85
+
Chart.OHLC(
86
+
openData,
87
+
highData,
88
+
lowData,
89
+
closeData,
90
+
dateData,
91
+
IncreasingColor = Color.fromKeyword Cyan,
92
+
DecreasingColor = Color.fromKeyword Gray
93
+
)
94
+
95
+
(*** condition: ipynb ***)
96
+
#if IPYNB
97
+
ohlc2
98
+
#endif// IPYNB
99
+
100
+
(***hide***)
101
+
ohlc2 |> GenericChart.toChartHTML
102
+
(***include-it-raw***)
103
+
104
+
(**
105
+
## Removing the rangeslider
106
+
107
+
If you want to hide the rangeslider, use `withXAxisRangeSlider` and hide it:
0 commit comments