Quantreex Documentation

Logic expressions with indicators

Logical expressions with indicators can be created using logical operators such >, >=, <, <=, and =. These logic expressions are used to compare different indicator levels.

In this example the levels two different Simple Moving Average (SMA) along with a green candlestick (close > Open) are compared:

Rule:

  • SMA 20 greater than SMA 100 (delimited by green region).
  • OHLC Close greater than OHLC Open (corresponds to green candlesticks in the delimited region).

Legend:

  • SMA 20 Green line

  • SMA 100 Orange line

Image 0 Source: Dukascopy

The equivalent logic using the Strategy Designer can be defined as follows:

Image 0