How can I draw candle charts in C#? Does anybody has any examples with a nice interface?
Candlesticks are graphical representations of price movements for a given period of time. They are commonly formed by the opening, high, low, and closing prices of a financial instrument. If the opening price is above the closing price then a filled (normally red or black) candlestick is drawn.
Steps to Create an OHLC ChartCreate or design a SQL query. Run the query and check the results. Display and enable the Chart query builder. For your opening and closing price values, use the Stock Charts – Stock Open and/or Stock Close selections.
Which candlestick pattern is most reliable? Many patterns are preferred and deemed the most reliable by different traders. Some of the most popular are: bullish/bearish engulfing lines; bullish/bearish long-legged doji; and bullish/bearish abandoned baby top and bottom.
I've used the MSChart and found it to be pretty good. It supports candlestick charts. I've used ZedGraph as well but found a few graphical anomalies showed up on my charts but they were otherwise good as well.
I use this for stock data but its in VB
With Chart1.ChartAreas("myarea")
.AxisY.Maximum = (Math.Ceiling((HighValue * 100)) / 100)
.AxisY.Minimum = (Math.Floor((LowValue * 100)) / 100)
.AxisY.LabelStyle.Format = "{0.00}"
End With
Dim s1 As New Series
With s1
.ChartArea = "myarea"
.ChartType = SeriesChartType.Candlestick
.XValueType = ChartValueType.String
.YValueType = ChartValueType.Single
.YValuesPerPoint = 4
.CustomProperties = "PriceDownColor=Red, PriceUpColor=Green"
End With
For i = Globals.GraphColumns - 1 To 0 Step -1
OutData = Data_Array.Item(i)
s1.Points.AddXY(OutData.thedate, OutData.high, OutData.low, OutData.close, OutData.open)
Next
Chart1.Series.Add(s1)
Me.Controls.Add(Chart1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With