Trading signals

On the previous page (Indicators) we added all indicators. Once all indicators are added, you can create the trading signals ('signals') you want to use for the opening or closing of an order. If you want to edit your indicators, you simply go back and adjust your parameters.

Signals are a very powerful tool to create almost any Open- and Close logic you can think of. Creating a signal may seem quite difficult in the beginning, but we believe that anyone can master building signals within a week. So let's be persistent and learn how to create signals.

You can use the “And” operator when all conditions need to be true, or the “Or” operator when any of the conditions need to be true. You can compare indicators, set up conditions or compare constant values. So far, we've been able to create almost any strategy we could imagine. If you run into a limitation of the tool, please let us know and use the contact form , or mail us on .

Building signals

Your EA always has 4 signals.

  • Open Buy
  • Open Sell
  • Close Buy
  • Close Sell
Activate or deactivate a signal

You can activate or deactivate a signal by clicking on the options button and select activate/deactivate. The EA needs at least an active Open Buy or Open Sell signal to work correctly. When you disable both of the Open signals, your EA will never open an order.

activate deactivate signal
Click the option button to activate/deactivate a signal
Copy or Paste a signal

You can use the same menu as used for activating/ deactivating a signal to Copy and Paste a signal to the other types of signal. A common scenario is that you start by creating the Open Buy Signal. When ready, you may want to copy the Open Buy signal to the Close Sell signal and you may want to copy the Open Sell signal to the Close Buy signal. This way the open order will switch from a buy order, to a sell order and vice versa.

copy paste signal
Click the option button to copy/paste a signal
Invert a signal

You can use the same menu as used for activating/ deactivating a signal to invert a signal. A common scenario is that you start by creating the Open Buy Signal. When ready, you will want to create the Open Sell signal, which is the same as the Open Buy signal, but then Inverted. To do so, click the Inverse button on the Open Sell signal after you copied the signal from the Open Buy signal.

inert signal
Click the option button to invert the selected signal
Open signal editor

You can click the signal you want to edit, which will open the signal editor.

Shift and Shift+1

An indicator always has a Shift and a Shift+1.

  • Shift: The shift value as defined in your indicator.
  • Shift+1: The shift value as defined in your indicator + 1.
Value and PreviousValue
Select Shift or Shift+1
Root node

A signal has 1 root node. The root node cannot be removed. Start building your condition from the root node.

root node
A signal has 1 root node
Remove a node

You can remove nodes by starting at the leaves of the signal and select "Remove" under options. A leaf is a node without children. If a node has leaves the node cannot be removed.

remove end-node
Click remove to remove the node.
Drag-and-drop a node

Rearranging the nodes is possible by using drag-and-drop. Hover over the signal, press the left mouse button, drag the node and drop it where you would like it to be.

drag-and-drop
Drag-and-drop
Invalid signals

When you are building signals you can create a signal that is invalid. Invalid signals cannot be saved. You know that your signal is invalid when you see the exclamation mark with an error message in the top summary box.

signal-invalid
Example of an invalid signal. This error message can get very technical but it gives you a good indication on what is wrong. In this example we have comparison operator 'greater than' with only one side of the comparison, wihtout a second condition part. A comparison operator must have 2 conditions and/or condition parts.
Nested signals

You can make signals as complex as you would like. To easily understand how signals work, a good strategy is to divide them into blocks. Each block returns true or false.

complex signal
Divide signals into blocks. Each block returns true or false. Because we use the logical AND operator as root node all 3 blocks need to be true for the signal to activate.

Signals can be nested. This allows you to build even more complex signals.

complex signal figure 2
In this example 1 out of 2 gray blocks need to be true because the parent operator is logical OR. The top 2 blue blocks also need to be true for the signal to activate, because the root operator is a logical AND.

Options context menu

Click on the button after the node. This will open the option menu. Depending on the node you clicked this will give you several options.

operator options
Operator options
Condition

This option will add a condition. A condition is an expression with a left operand, an operator and a right operand. By default, the left and right operands are indicators. The indicators you've created will appear here. You can toggle between an indicator, function or constant by clicking on the arrow next to the indicator.

toggle node
Toggle between indicator, function or constant value

  • Click on Indicator to access the indicators you have created.
  • Click on Function to access functions like ask, bid, hour, minute etc.
  • Click on Value to add a constant value. The default value is EMPTY which represents a MetaTrader empty value: 2147483647.

Condition part

This option will add a part of a condition. You can toggle between indicator, function and constant.

add condition part
Add a condition part
Operator

Adds an operator. Must be used as a parent node and therefore must contain child nodes. If there is an operator without child nodes it will be ignored. For a full list of operators go to Operators. Use the arrow next to the operator to toggle between operator categories. You may or may not see all categories when you toggle through the available options. This depends on the kind of parent operator.

operator node
Add an operator node.
Remove

This removes a condition, condition part or operator. Only end-nodes can be removed. Start by removing the end-nodes first.

remove condition
Removes a condition.

Operators

The signal editor enables you with a set of well known operators. We've added a set of special crossover operators to make things easier.

SymbolNameCategory
crossoverCrossoverCrossover
crossover upCrossover from belowCrossover
crossover downCrossover from aboveCrossover
AndAndLogical
OrOrLogical
==Equal toComparison
!=Not equal toComparison
>Greater thanComparison
<Less thanComparison
+AddArithmetic
-SubstractArithmetic
/DivideArithmetic
*MultiplyArithmetic
%ModuloArithmetic
Crossover

Use this operator if the direction of the crossover does not matter.

crossover example
If MA 7 crosses over MA 30 the signal will activate. It does not matter from which direction MA 7 crosses over MA 30.
Crossover from below

Use this operator if the direction crosses over from below.

crossover from below example
If MA 7 crosses over MA 30 from below the signal will activate.
Crossover from above

Use this operator if the direction crosses over from above.

crossover from above example
If MA 7 crosses over MA 30 from above the signal will activate.
AND

Logical AND operator. Apply this operator to multiple boolean expressions. Returns true if all expressions are true.

logical AND example
If the the value of indicator MA 7 is larger than the value of MA30 AND the value of MA 7 is larger than the previous value of MA 7 the signal will activate.
OR

Logical OR operator. Apply this operator to multiple boolean expressions. Returns true if one or more expressions are true.

logical OR example
If the the value of indicator MA 7 is larger than the value of MA30 OR the value of MA 7 is larger than the previous value of MA 7 the signal will activate.
Equal to

Comparison operator. Returns true if both sides of the expression are equal.

equal example
If the the value of indicator MA 7 is equal to the value of MA30, the signal will activate.
Not equal to

Comparison operator. Returns true if both sides of the expression are not equal.

not equal example
If the the value of indicator MA 7 is not equal to the value of MA30, the signal will activate.
Greater than

Comparison operator. Returns true if the left side of the expression is greater than the right side of the expression.

greater than example
If the the value of indicator MA 7 is greater than the value of MA30, the signal will activate.
Less than

Comparison operator. Returns true if the left side of the expression is less than the right side of the expression.

less than example
If the the value of indicator MA 7 is less than the value of MA30, the signal will activate.
Add

Use this operator to add numbers.

add example
If the the value of indicator MA 7 + 2 is larger than the value of MA30, the signal will activate.
Substract

Use this operator to substract numbers.

subscract example
If the the value of indicator MA 7 - 2 is larger than the value of MA30, the signal will activate.
Divide

Use this operator to divide numbers.

devide example
If the the value of indicator MA 7 divided by 2 is larger than the value of MA30, the signal will activate.
Multiply

Use this operator to multiply numbers.

multiply example
If the the value of indicator MA 7 multiplied by 2 is larger than the value of MA30, the signal will activate.
Modulo

Returns the remainder after a division.

Next: Modules