Indicators are popular tools used by most forex, stocks, commodities, indices, and cryptocurrency traders. They are used in both price action and technical analysis. In this article, we will focus on what custom indicators are, why you need them, how to build them, and how to add them in MT4.

What are indicators?

There are three main methods of conducting analysis in forex trading. Fundamental analysis is the process of looking at economic data and events of the day and then predicting their impact on a currency pair. For example, you can decide to buy the EURUSD pair after a dovish statement by the Federal Reserve.

In price action analysis, you look at the overall arrangement of a chart and predict the future direction of a currency pair. For example, if you see a currency pair forming a bullish flag or a bullish pennant pattern, you can initiate a buy trade.

Finally, there is the use of technical analysis. It is the process where you identify chart patterns and then use technical indicators to predict the direction that an asset will follow. Most trading software like MetaTrader 4 and 5 and NinjaTrader comes loaded with indicators like Moving Average and the Average Directional Index (ADX).

Inbuilt vs. custom indicator

A custom indicator is a tool that has been developed by a trader using a specific language. Those built for the MetaTrader 4 are built using the MetaQuotes Language (MQL)

The main difference between custom and inbuilt indicators like Moving Average and the Stochastic Oscillator is that the latter are found in most platforms. Custom ones are built by a trader for a specific platform. 

There are several reasons why a trader may want to build a custom indicator. First, a trader might have an idea of an indicator that does not exist in their platform. Second, they might want to improve the concepts of an existing indicator. Finally, you might build a custom indicator for experimental purposes.

How to build a custom indicator in MT4

Building a custom indicator in MT4 is not an easy thing to do, which explains why many people don’t consider doing it. It is a difficult process because it requires two important skills that are not easy to master.

First, to build a custom indicator or an expert advisor, you need to have some trading experience. The experience is necessary because you will need to apply these concepts when building the indicator.

Second, you will need to have software development experience. As such, you need to have some skills in languages like MQL and Python.

The first step when building the custom indicator is to have a plan. Experts recommend a situation where you sit down and write down the details of the indicator on a piece of paper. You can also use digital platforms like Google Docs or Notion. The benefit of writing this information is that it will help to simplify the building process.

Second, while you can use other coding platforms, it is more recommended that you use the tools provided by the MT4 to build the indicator. You do this by opening the MetaQuotes Editor Tool, which is an inbuilt feature in the trading software. This platform is accessed by opening the tools tab. Alternatively, you can press the F4 tab. Doing this will open the window below.

MetaQuotes Editor

The next step is where you press the New button, which will open the following window. In this window, you should select the custom indicator option.

MQL 4 setup wizard

In the next page, you should enter brief information such as the name of the custom indicator you are building. You should also enter the author’s name and the website. The latter two options are not mandatory.

MQL setup wizard

On the next page, you should add the event handlers of the indicator. In most cases, developers will select the OnCalcule option. The other options that are available are OnTimer and OnChartEvent. 

Event handlers in MQL

The final stage before you start doing the actual coding is to specify where the indicator will appear. The indicator can appear inside the main chart or below the chart. If you are building a trend indicator, then you should let it remain in the upper section. On the other hand, if you are building an oscillator, you should opt for one that appears below the main chart.

After doing all this, you will be taken to the following window, where you should start coding your custom indicator.

custom indicator window

After finishing all this, the next stage is where you press the compile button and then save the custom indicator.

We recommend that you save the indicator in the indicator folder of the MT4. You can access this folder directly by going to file and then open data folder.

accessing custom indicators

Finally, you can access the custom indicator by going to indicators then custom indicators, as shown in the chart above.

Alternatives to custom indicators

Building a custom indicator is a long and time-consuming process. It also requires people with both trading and software development skills. Therefore, there are two main options to go about it in technical analysis.

First, you can decide to use the inbuild indicators found in the MT4 or MT5. In my experience, while these indicators are limited, it is possible to have a successful career using them. All you need to do is to master them.

buying custom indicators

The second option is to buy a custom indicator. The best place to buy these custom indicators is in the MQL4 marketplace. In it, you can find both free and premium indicators.

Summary

A custom indicator is a useful tool that can help you become a better trader. In this article, we have looked at the process of building a good custom indicator and the challenges involved. We have also explored how you can buy the indicators.

Leave a Reply

3  +  6  =