Here we will analyze how to implement indicators for the 4XLab.NET FOREX simulation software using the C#.NET language and Object Oriented Programming. The following list shows the indicators whose source code is included with the program. By learning the programming techniques used to create these, you can expand this list and implement your favorite indicators if they are not listed here.
All indicators are objects, and can be used inside other indicators. For example, the Average True Range indicator (ATR) works by having an instance of the True Range (TR) indicator calculate the true range of the past two candles, then sending the result to an instance of the Simple Moving Average indicator (SMA), thus obtaining the average of the true range. You can go to the ATR indicator source code to read more.
The MACD indicator is another example of how the architecture of 4XLab.NET makes developing new indicators easy. This indicator is calculated by subtracting a slow exponential moving average from a fast exponential moving average. This difference is called MACD and is then sent to a third exponential moving average and becomes the SIGNAL. The difference (MACD) and the exponential moving average of the difference (SIGNAL) are then plotted and become the familiar lines which cross when a trend is underway. You can go to the MACD indicator source code to read more.
To fully appreciate this forum, you will need to create a free account and login to the forums to download the Source Code for the 4XLab.NET software. You can also download a compiled version of the 4XLab.NET software without registering.
Indicator List (grouped by family):