A PHP Error was encountered

Severity: Warning

Message: mysqli::real_connect() [mysqli.real-connect]: Headers and client library minor version mismatch. Headers:100613 Library:100505

Filename: mysqli/mysqli_driver.php

Line Number: 74

Indicators Setup | JedeyeForex

Indicators Setup

JedeyeFX Documentation


Indicators Setup


Page Sections

As you may already know, you can build your order opening/closing conditions based on indicator values. JedeyeFX supports all the original indicators that comes bundled with MetaTrader 4 and also has the ability of supporting custom indicators. Custom indicators support is made available through the installation of a support plugin for each custom indicator.

In order to use indicators in any of JedeyeFX’s features you have to set the ones you are going to use in the Indicators Setup input. This is a very important step, which if not performed, will almost certainly lead to unexpected results.

The proper format for setting up an indicator is the following:


Parameters colored in gray are optional and not mandatory as opposed to what happend with the blue ones.

The first parameter is always the indicator identifier. The Indicator Properties   section has all the identifiers and other available keywords (for extracting indicator values) for each MetaTrader 4 official indicator. By convention, all indicators identifiers begins with the lowercase letter i.

Let’s take the MACD
(Moving Average Convergence/Divergence) indicator as example. Following the previously mentioned rule, the first parameter for setting up the MACD indicator would be iMACD. By itself, this is not enough since all the indicators need to know in what timeframe they should be working.

Setting Indicator Timeframe

Since the timeframe value is an indicator parameter and all parameters are enclosed in brackets after the indicator identifier, you need to put the desired timeframe (let’s say M15) as being the first indicator parameter (always) like this:




In this example two timeframe setting methods are given, where in the first one you set the timeframe value as minutes and in the second you set it like the convention MetaTrader 4 uses.

In order to see the difference, let’s use a greater timeframe like 1 hour. The configuration would look like iMACD(60), in the first method, and like  iMACD(H1), in the last form. Since most traders want the indicator to use the same timeframe of the chart the expert advisor is attached to, the only thing to do is to set the timeframe value to 0. Just as simple as that:


Always remember that this is the minimal configuration required to set an indicator. It is recommended that you check the Indicator Timeframes Table for learning more about all the available timeframe keywords.

Setting Indicator Parameters

Indicators like MACD have several configurable parameters like the signal period or the applied price among others. These can be configured in the expert advisor as well.

Note that when no parameters are passed, just like in the previous examples (i.e.: iMACD(0)), JedeyeFX will automatically assume the indicator defaults.

The parameters are set after the indicator timeframe value, brackets enclosed. They should always be semicolon separated (;) and they must follow the order described in the corresponding indicator section on the Indicators Configuration Table.

  Important Note: Whenever you work with parameters between brackets, remember they must be always separated by a semicolon, always! Confusing semicolon with comma in these cases is very common, so be careful. Commas are used to separate full conditions outside brackets while semicolon separate condition or command parameters brackets enclosed.

Let’s get back to the indicator parameter setup subject. The following figure depicts the MACD indicator configuration window. As we can see, this indicator has 4 major configurable parameters: Fast EMA, Slow EMA, MACD SMA and Applied Price (Apply to). Their default values are those which you can see in the picture, since they are the ones that are set whenever you click the Reset button.
MACD Indicator Parameters Window

Let’s now see how can we tell JedeyeFX to use the MACD indicator with custom parameter values. So far, we learned that the minimal configuration required for setting up this indicator is iMACD(0). Setting up custom parameter values does not requires big changes to this configuration. It is only needed to add the parameters values next to the current timeframe value set (which is 0). Say we want Fast EMA to be 15 and Slow EMA to be 22. The following configuration will do that:


As you see, it is easy but you have some rules to follow. The first one is that you must follow the order of each parameter which is described in each Indicator Configuration Table. Secondly, if you want to set only the second parameter but not the first one (leaving it in its default state), you can simply ignore it but not skip it completely. For example, when setting only the Slow EMA parameter this would not be acceptable: iMACD(0;22). This is due to the fact that you are setting the Fast EMA parameter with 26 and not the second one (Slow EMA) because the order matters! In order to correctly accomplish this, you would need to write this configuration as follows:




Both ways do exactly the same, so its just a matter of personal choice for better reading/understanding. Notice that we are not skipping the first parameter, but by leaving it blank or assigning it with a NULL keyword, we are telling instead that this parameter should keep its default value.

Regarding a third rule, you must learn that you don’t need to setup all parameters. You just need to setup the ones (with value or empty/NULL for defaults) until the last one you want to set. After that one, if no more parameters are specified, the default values will be used.


Setting Indicator Alias

While some indicator identifiers may be short and easy to write, other ones are longer and when you are dealing with complex conditions where you need to write the same identifier many times, it can be very messy to work with. In addition to that, you may even want to build conditions with the same indicator but having different timeframes. You cannot do that without differentiate them since they have the same identifier (one identifier macthes a single timeframe indicator configuration, always). That’s the reason why we have implemented the alias naming for indicators. This feature allows you to set a custom, unique and usually shorter name for the indicators you set up. This can be configured as easy as that:


Note that alias names cannot have blank spaces. Use only letters (lowercase and uppercase) and numbers. The alias must be set after a colon (:).

Now, whenever you need to use this indicator in any input, you just need to write ma1 instead of the fully qualified identifier.

Setting Multiple Indicators

Multiple indicators can be set by separating their configurations with a comma (,), like this:

As you can see, we have two MACD indicator instances set, one for 15 minutes timeframe and another one for 30 minutes timeframe. In order to refer them in your order open and close conditions we will now use im15 and im30. Writing iMACD will get the first iMACD configuration found, so you will never be able to distinguish which timeframe instance to use. That’s why we recommend you to always use alias in your indicators since it’s a good practice and will avoid any possible ambiguities.
We want you to notice again how the usage of the semicolon and comma are different. Semicolons are used between brackets - (x;y;z), always, and are used to separate indicators and commands parameters. Commas (,) are used for separating the conditions from each other. Always keep this in mind in order to avoid unwanted mistakes.