How does the 'COMPARE' block work?

In a lot of cases, it might be important to compare two indicator values amongst one another. The 'Compare block' is a general-purpose condition block that can be used to compare results of various indicators and various price values with each other.

Users start off by searching for the indicators they want to compare:

Once a user selects the indicators to compare, the edit dialog shows up as below with some sections:


Once a user selects the indicators they want to compare, the user will be shown a bunch of parameters filled with appropriate default values which the user can edit for each indicator.

Each indicator has some required parameters and some optional parameters that the user can edit. All parameters have some default value.


More often than not, an indicator can have multiple outputs. The user selects a required output for each indicator/price value and can add a comparison condition to check if the 1st output value is greater/lesser/crosses over the second output value

Advanced Parameters:

The compare block has Persistence and Candle History as advance inputs. Apart from these, additional advance parameters may be available depending on the specific indicators.

Sample strategy conditions:

Below are a few examples of how a strategy condition can be set up 

Condition 1:

Trigger an event when the EMA(10) is greater than TEMA(30)

Condition 2:

Trigger an event when the EMA(10) is greater than TEMA(30) by 2% and persists for 2 successive candles

Easily create trading strategies on Mudrex, without any coding! Join Mudrex today!

Was this article helpful?
7 out of 8 found this helpful