XFinChart Charting Library — An Introduction (Part 1)

Aug 24 2020
 

“All you need is one pattern to make a living.”

This quote by reputed American commodities and futures trader Linda Raschke beautifully summarizes the importance of spotting trade-able signals using patterns and indicators. With the increasing impact of machines that can do millions of transactions in a matter of seconds with better connectivity and processing speed, it is becoming increasingly difficult for the average retail trader to trade and profit in today’s financial markets.

Algorithmic trading in India across the cash and derivatives market (as a percentage of total turnover) increased by roughly 40% to 49.8% in 2018 from merely 9.26% (average) in 2010, according to Financial Express. In times like this, it is becoming increasingly essential for retail traders to have access to technical analysis tools to gain an edge over conventional methods. Technical analysis is a method of generating actionable buy/sell signals by analyzing statistics generated by market activity, such as past prices and volume. Technical analysts do not attempt to measure a security’s intrinsic value, but instead, use charts and other tools like indicators to identify patterns that can suggest future activity.

To aid the common retail traders with technical analysis tools, Symphony Fintech Solutions Pvt. Ltd. has come up with its suite of state of the art technical charting, analysis and back-testing libraries based on C# and .NET. This blog is the first in a series of blogs that provide a walk-through of the Technical Indicator and Trading Signals functionality of the XFinChart library by Symphony Fintech. It is a charting and technical analysis library that provides a simple and intuitive way to create financial charts in your applications and offers innovative features that set new stock market charting standards. This library exposes .NET based APIs used to customize and add interactive financial charts to any of your trading or technical analysis platforms and applications. In this blog series, an in-depth explanation of using the indicators for your own signals and creating your own indicators will be provided.

Image for post
Aniket Niranjan Mishra

I’m Aniket Niranjan Mishra, and I am a fourth-year undergraduate student at the Indian Institute of Technology, Kharagpur. I am currently enrolled in the Dual Degree course in Metallurgical and Materials Engineering with specialization in Financial Engineering. Having developed a keen interest in the field of Algorithmic Trading and Quantitative Finance lately, I interned as a Software Developer at Symphony Fintech Solutions Pvt. Ltd. in Summer 2020. I was a part of the High-Frequency Trading Development Team and worked directly on the tools discussed in this blog series. You can find more about me here, I will be more than happy to clear any doubts that you have and listen to your insights.

In this particular blog, we will get to know how to get started with using the XFinchart Library for the end user’s use case and some essential variables/implementations that will be instrumental for understanding the next set of blogs. Keeping this in mind, this blog is a prerequisite for the following blogs in this series.

Image for post

Salient features

Charting is one of the most critical components of any trading system development process. XFinChart is a lightweight, flexible, interactive, feature-rich, and developer-friendly stock market data visualization charting and technical analysis library for .NET. The chart library also provides an inbuilt framework for technical indicators and real-time data rendering. The technical analysis library offers several technical indicators that can be used to build trading strategies for stock markets, futures, Forex, etc.

The indicators have been implemented through XTALib Technical Indicator Library. It is a flexible and powerful Technical Analysis Indicator framework library implemented in C#. It is a library for programmers to develop custom indicators for financial market analysis, charting, and developing a full-featured trading application in .NET compatible with XFinChart. XTALib currently implements 70+ most frequently used indicators as an open source for your reference and provides an open framework to quickly develop a proprietary indicator.

Image for post

Windowed look of XFinChart interface

XFinChart provides the option to illustrate the periodic price movement using popular stock chart types like candle, bar, line, etc. For this purpose, both past data and low latency real-time data feed support are available. Built using the native .NET framework for Windows, XFinchart keeps usability, resources & performance in mind as trading systems require fast data access and analysis to gain a competitive edge in today’s financial markets. The library also supports built-in abstract studies like Gann Fan, Fibonacci Retracement, Fibonacci Extension, Fibonacci Time Zone, Pitchfork, etc. for advanced trading logic.

The functionalities in this post will be explained using a simple Test Project in Visual Studio. As the whole library is built using C# and .NET, it is advisable to use Visual Studio for making any custom APIs and indicators. The project used here is named XFinChartSimpleTester. After creating a new Visual Studio project, add the following DLLs provided in the XFinChartPackage to References:-

DLL/XTS.Base.Data.dll
DLL/ XTS.FinancialChart.dll

Also, add the following namespaces to your project,

  • using namespace XTS.FinancialChart;
    This provides the rendering for financial charts.
  • using namespace XTS.Base.Data;
    This provides access to inbuilt data structures specific to trading.
  • using namespace XTS.Base.Data.TI;
    This provides access to pre-built technical indicators included with XFinChart.

More than 70 technical indicators have already been included in the library that cover a wide range of indicator types, including Moving Average based, Momentum based, and Trend based indicators.

The underlying instrument through which stock information is handled in the library is an OHLC bar. OHLC bars are basic units used in charting and studying of chart patterns. 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. Technical analysis is based almost entirely on the study of price and volume. The fields which define a security’s price and volume are explained below.

Open — The price of the first trade for the period (e.g., the first trade of the day)
High — The highest price that the security traded during the period.
Low — The lowest price that the security traded during the period.
Close — The last price that the security traded during the period. Due to its availability, the Close is the most often used price for analysis.
Volume — Number of shares (or contracts) that were traded during the period. The relationship between prices and volume (e.g., increasing prices accompanied by increasing volume) is important in technical analysis as it provides a measure of liquidity.
Open Interest — Total number of outstanding contracts (i.e., those that have not been exercised, closed, or expired) of a future or option

The data that is read using the File Parser has to be in the OHLC format for full compatibility with the library. The data can be in csv/txt/excel format.

This is it for the introduction blog of this series. The next two blogs will be on the Technical Indicator and Signal functionalities of the libraries, respectively. Please do go through the following blogs for an in-depth explanation of these topics.

Thanks.

Link to Part 2:- XFinChart Charting Library — Make your own Indicators (Part 2)

Link to Part 3:- XFinChart Charting Library — Make your own Trading Signals (Part 3)

Contact US

Let us help you to achieve your goals!

 
 
 
 
 
By providing Symphony with your contact information Symphony will process your personal data for the purpose of providing you with the information you have requested. For more information regarding Symphony's processing of your personal data, please read Symphony's Privacy Notice here.

  • Get latest updates from Us