This project demonstrates how to create a Heikin-Ashi Chart using Syncfusion WPF SfChart and compare it with a traditional Candlestick Chart. The implementation includes Heikin-Ashi formula calculations, custom rendering, and additional features like trackball labels, theme customization, and axis formatting.
Heikin-Ashi charts help traders smooth out market trends by reducing noise, making them useful for identifying potential reversals and trend continuations. This project also includes trackball interaction for better data analysis.
• Custom Heikin-Ashi Series: Built by extending the CandleSeries, the Heikin-Ashi chart calculates its own data using a separate ItemsSource.
• Comparison with Candlestick Chart: A direct visual comparison between Heikin-Ashi and traditional candlestick charts.
• Trackball with Custom Labeling: Displays Open, High, Low, and Close prices for better data insight.
• Axis Customization: Customize DateTimeCategory Axis and Numerical Axis with formatted labels.
The Heikin-Ashi chart calculates new OHLC values using the following formulas.The formula smooths out volatility using the following calculations:
Open = (Previous Open + Previous Close) / 2
Close = (Open + High + Low + Close) / 4
High = Max(High, Open, Close)
Low = Min(Low, Open, Close)
With these implementations, we will get the output that resembles the following gif.
If you encounter a Path Too Long Exception while building the project:
- Close Visual Studio.
- Rename the repository to a shorter name.
- Rebuild the project.
Refer to the blog, Heikin-Ashi vs. Candlestick Charts: Which Is Better for Market Trend Analysis in WPF for detailed instructions and code examples.