Most Recent Occurrence (MRO)
Most Recent Occurrence (MRO)
Definition
Returns the number of bars ago that the test condition evaluated to true within the specified look back period expressed in bars. The MRO() method starts from the current bar works away (backward) from it.
This method does NOT work on multi-series strategies and indicators.
Method Return Value
An int value representing the number of bars ago. Returns a value of -1 if the specified test condition did not evaluate to true within the look-back period.
Syntax
MRO(Func\<bool\> condition, int instance, int lookBackPeriod)
- The “instance” parameter MUST be greater than 0.
- The “lookBackPeriod” parameter MUST be greater than 0.
- Please check the Log tab for any other exceptions that may be thrown by the condition function parameter.
Parameters
The syntax for the “condition” parameter uses lambda expression syntax.

