Happened Within (HappenedWithin)

This function can be accessed only in the Toolbox.

The Happened Within function returns a value of true if the designated event happened within the specified number of bars. In the Setup Parameters window users can specify whether every occurrence of the event is included in the evaluation or only every 2nd, 3rd, 4th, etc. occurrence of the event.

Example: HappenedWithin(Day(@)<> Day(@)[-1],21,1)

 

Parameter

Description

Bar Count

Specifies the number of bars the function uses to determine whether the event is true or false.

NEvents

Allows the user to specify whether every occurrence of the event triggers a true or only every 2nd, 3rd, 4th, etc.