All Collections
Frequently Asked Questions
Technical FAQ
Crossing Events, Closed Candles & Rule Logic
Crossing Events, Closed Candles & Rule Logic

How are Crossing events calculated/interpreted by the Rule Engine?

Reni Asumah avatar
Written by Reni Asumah
Updated over a week ago

Introducing: Crossing Events, Closed Candles & Rule Logic

Coinrule uses only confirmed “closed prices” to trigger events. This removes intra-candle volatility and ensures a more accurate signal is used for your strategy.

How would the above rule logic be interpreted: 'MA (9) crossing below price'?

The latest closed MA (9) candle value is compared to the close price of the previous closed candle.

Generally, all crossing events (no matter the indicator) are evaluated like this:

The rule engine will always evaluate the value of price or an indicator of the 'latest closed candle' and compare it to a value, be it price or an indicator, of the previous closed candle.

The rule will trigger immediately with the opening of the new candle.

Example 1

For the above condition to trigger, the 30 minutes BB Upper Band value in the latest Closed Candle must have crossed above the EMA(55) value. See below for the exact calculation steps:

Example 2

For the above condition to trigger, the 30 minutes MFI value in the latest Closed Candle must have been lower than 50. See below for the exact calculation steps:

When dealing with rules (such as the example above) with conditions with multiple timeframes, the rule can trigger at anytime.

For example, if the close price of the previous week's candle was 100 USDT, the current price is compared to that close price as quickly as possible, depending on your plan and server speed. The first condition (IF any coin has price increase by 0.001% within 1 week) can be true in every moment which would trigger the rule to execute.

If in this moment the price jumps to 101 USDT, condition 1 is already true. If condition 2 is also true, the rule will buy. If price moves to 102 USDT, condition 1 continues to be true and the rule will buy again if condition 2 is also true again.

Head to the rule page to build your rule using the crossing logic on Coinrule.

Did this answer your question?