Step1- Set your indicators

Indicator Type: This expert supports all types of standard indicators, oscillators, volumes, and Bill Williams indicators. You can create any expression using these indicators and oscillators. For example, if you want a function that calculates the distance between two moving averages, you can define an expression and set this value as the distance between the two moving averages. Whenever you use the name of this expression, it will return the corresponding value. We will explain more about expressions later.

ESB supports various types of expressions. One of them is “If Expressions“. Conditional expressions can be defined as indicators. Sometimes you need to check if a specific condition is true to perform a task and, if not, perform a different task. This can be handled by “IF Expressions,” which are conditional. In “IF WAIT WHILE” expressions, you can specify that if a condition is met, wait for a second condition while a particular expression remains true. You can also set a maximum number of candles or a maximum duration for checking the condition.

Some expressions are true only for a moment. For example, “Ask=1.12345” is true only when the ask price is 1.12345. If you need to keep the value true for a specific number of candles or duration, another type of indicator called Trigger and Keeper can be used to maintain the value as long as another expression is true.

If you need to check a series of expressions, you can use series indicators. ESB supports two types of series: Expression Series and Expression Machine. ESB checks them in sequence, and if the last expression is true, the output will be true. The Expression Machine waits for an expression and, as it starts checking Expression N, it ignores previous expressions. It functions like a machine that moves to the next state without considering prior steps.

Another type of indicator is Custom Indicators. If you want to use an indicator not included in the ESB list, simply copy your indicator to the MetaTrader indicator folder and create a custom indicator with its name in ESB. This allows you to access the output of the custom indicator.

If your custom indicator uses arrows to show signals, you can use Custom Indicator Signal Arrow to detect arrows and signals. It functions the same as a regular custom indicator, but ESB is designed to handle arrows.

If you don’t have the source code for the Custom Indicator, you can use Custom Indicator by Object to read the value of your desired custom indicator by detecting its objects on the chart. You can detect indicator objects by color, prefix, specific words, or time.

You can place an object on the chart and then read its value at any shift using the “Chart Object” indicator. For example, you can place a trend line on the chart, and ESB will use this type of indicator to get the trend line value. Every time the price crosses it, ESB will send you a notification. To create shared memory and share variables and signals between two or more instances of ESB on different charts, you can use the Memory indicators.

For reading data or values from files, you can use the File indicator. This is useful for retrieving data from other applications or experts by sharing it in a file.

ESB has a robust engine for capturing live news. You can check news using News Indicators, which are unique. For example, you can set a condition to execute a buy order if there is high-priority news within the next hour.

As mentioned, ESB supports all standard MetaTrader indicators and oscillators.

If you want to read a candle parameter such as its open, long shadow, high, low, etc., you can use indicators with the abbreviation letter “C” in the indicator type. You can use any candle with any shift you need. For Heiken-Ashi candles, simply specify “Heiken-Ashi” in the custom parameters.

If you want to work with a group of candles, for example, to find the value of the lowest low in an ascending group of candles, use the abbreviation “NxC“.

If you need tick values, such as the current market ask value, use indicators with the word “Ticks”.

To access properties of individual orders, use the Order indicators. For working with a group of orders, use indicators starting with “Orders“. Historical orders can be accessed using the “Closed Order” and “Closed Orders” indicators. For account information like balance, equity, margin, etc., use Account indicators.

If you need indicators related to candle patterns, such as the engulfing pattern, you can use the “Patterns” indicators. They can detect various Japanese candlestick patterns in the market.

Some Indicators relate to extremum and swing points, which can give you the value of the minimum and maximum points. For example, you can have a 4th last price peak in the market.

If you need indicators to determine support and resistance levels, they are also supported. For instance, if you need to trail your Stop Loss based on new support or resistance levels, or if you need to have a breakout strategy based on important support and resistance levels, you can use them here.

You can work with trend lines here for example, you may have an indicator that has a true value when a trend line is touched. You may also work with the trend line slope.

You have an indicator here called “Pivot” which deals with the famous PRS indicator, it updates 7 price levels every day. Three of them are Resistance, 3 of them are Support, and one of them is Pivot. For example, you may want to know if the price has passed any of them or not.

If your strategy is based on zig-zag, you can do it by its indicator.

You can also define any indicator or any condition by yourself in user-defined indicators. For example, you can make a function that gives the value 5 when two moving averages cross each other.

So in ESB, you have no restraint about your desired indicators. Many types of indicators are supported. And you can make the unsupported ones by yourself. Many of the builders in the market aren’t capable of supporting lots of the indicators we have supported here.

Name: Keep in mind when you want to set an indicator you have to choose a name for it, this name can only be any alphabet letter, lower or uppercase, numbers, and the underline sign. It must start with a letter and shouldn’t be a keyword for example ‘IsAbove’ or ‘CrossUp’ are forbidden to be an indicator name.

You can also determine the currency pair for any indicator you’ve defined and thus you can work with more than one pair at a time. But if you leave it empty, it automatically works on the pair that the expert is working on, and in the backtest, it works on your selected currency pair.

Shift: This is the number of candles that you need its indicator value and must not be confused with indicator shift. If indicator needs shift it can be set by parameters. We consider the shift number of current candle zero. The previous candle with shift number 1 the one before that 2 then 3 and so on.

Therefore, if you need the value of RSI for the 3rd candle, just set shift to 3. ESB also supports another type of shift that can be useful for gathering indicator value for a group of candles. In this case, you can set a shift by this format:

Start, End, Step, [min | max | avg | sum | pi | and | or | first | last | Nth]

That means you want a specific type (the minimum or maximum or average or sum or multiply or “and” or “or” or “first” or “last” or “Nth”) of the values from the candle’s number Start to End. For example, if you create a moving average and set shift to “1,10, max”, this returns a maximum of moving average from candle 1 to candle 10. “1,10, AVG” returns average of moving average from candle 1 to candle 10, and “1,10, sum” returns their sum and so on. If you write “1,10,2, AVG” it returns the average of the moving average from candle 1 to candle 10 with a step size of 2. It calculates 1 to 10 like this: 1,3,5,7,9.  If you don’t mention step size, it will be 1 by default.

Note that if use shift for expressions, you should add “[SHIFT]” everywhere in expression that needs to check. For example, if you want to ensure that MA1 is less than MA2 for the last 10 candles, create expression and set shift by “1,10, and” and write an expression like this: MA1[SHIFT]<MA2[SHIFT]. This type of expression checks conditions from shift 1 to shift 10 and then get the result by calculating like this:

(MA1[1]<MA2[1] and MA1[2]<MA2[2] and MA1[3]<MA2[3] and … and MA1[10]<MA2[10])

You can also write expressions as Start and End. For example, “3*ind1-10, exp3, MAX“. This is very useful for creating complicated plans. Sometimes you need find the first or last or N’th place that a specific condition meets. For example, you want to find candle number that ma1 crosses ma2 for first time. Just set shift by “1,100, FIRST” and write an expression like this: “MA1 CROSS MA2”. If you need to find candle number of the last occurrence of cross from candle 1 to 100, shift would be like this:  “1,100, LAST”. This return the last candle number that ma1 crosses ma2. For find the fifth cross, shift would be like “1,100,5TH”.

Period: Your indicator may have a period number, for example, you can set the period of your moving average to 14.

Applied Price: determines the applied price which can be open, median, closed, low or high of a candle.

Parameters: In front of the name of an indicator you see spaces for the parameters and you should set your preferred numbers in order, according to their fields. And they are separated from each other by commas.

For example, if you create a MACD indicator, you see “MACD {fast ema, slow ema, macd sma}” as the type of indicator. This means that MACD has 3 parameters. For setting these parameters, just write like “12,26,9” in the “Parameters” field. This means you set: fast ema=12 and slow ema=26 and macd sma=9. All parameters have a default value; ESB uses its default values in case you don’t set them manually.

In case you want to give value to only some of the parameters, you could write the “parameter name=value” for the ones you want to change its value and keep in default values for the other parameters. For example, you can write “slow ema=26” in the parameters field. This means you change only the “slow ema” parameter to 26 and other parameters use their default values. You also can write “fast ema=12, macd sma=9” for changing two of them.