Sometimes we want to use indicators that are not available in a default Metatrader installation. Metatrader refers to those indicators as custom indicators. We can also use those indicators in Trading SM but first we need to add them to the Indicators Panel. Let’s see an example of how we can add a custom indicator to Trading SM.
First of all, open Metatrader, select one custom indicator and attach the indicator to any chart. We will use the following Custom indicator: Calmed-Averages (Download). Open the inputs tab of your indicator.
The Inputs tab shows the parameters of the indicator. We need these parameters to add this custom indicator to Trading SM. Keep that window open, you will need to come back later.
Now, in Trading SM go to Tools -> Add Indicator. We need to introduce the name of the indicator. The name should be equal in TS Maker and Metatrader, otherwise the program will fail to get values from the indicator. A good approach in order to avoid possible mistakes is to copy and paste the name.
It is time to add the parameters of the indicator. This process is very simple but we need to pay attention to two important things: we need to respect the order of parameters as it is in the Inputs tab of Metatrader and select the right parameter type.
In Trading SM, we select the parameter type from a choice box. We have 3 options: Number, Text and True/False. Which one we select depends on the parameter icon in the Inputs tab of Metatrader.
- Number if icons are: or
- Text if icon is:
- True/False if icon is:
In contrast with what happened earlier in the name of the indicator, it doesn’t matter now whether the name of the parameter matches or not whilst you respect parameter order and type. Anyway, it is a good practice to assign the same names.
Using Custom Indicators
Once we have added the custom indicator to the Indicators Panel, we can create strategies that rely on that indicator.
If you come back to Metatrader and you look at the Calmed-Averages indicator, you see that the indicator prints two lines in the chart. In the Data Window, we can see the name the indicator assigns to those lines: Fast Line and Slow Line. If you mouse over the different bars, you see the different values of Fast Line and Slow Line in the Data Window.
From Trading SM, we can get those values. When we need to refer to these different values from Trading SM, we need to specify the order number. The first value is referred with the number 0, the second value with the number 1, the third with the number 2 and so on. In the Calmed-Averages indicator the Fast Line is the number 0 and the Slow Line is the number 1. Let’s create variables for getting Fast Line and Slow Line values of bar 1.
The same for bar 2.
Now, we can create a simple long crossover rule.
Getting Arrow Signals
Some custom indicators show arrow signals. For those that want to create Expert Advisors that rely on those signals, we are going to show you the best approach to accomplish this task.
We will use the Trend-Arrows custom indicator in this explanation. Download and install this indicator in Metatrader (Download). Once installed, add it to Trading SM.
Note that this indicator does not have parameters and so no parameters where added in Trading SM.
If you look at the Data Window in Metatrader, this indicator only shows values in bars where arrows are printed.
So, we need to detect when an arrow is printed in the last bar (bar 1). The first thing we do is create variables for each signal (buy and sell).
And then we use the Is Arrow Signal question to acknowledge whether there is a value or not.
Finally, we can create the corresponding conditions.