Crossing within the last 5 days
Author: grtrader
Creation Date: 8/15/2014 11:48 AM
profile picture


As a condition, i want to stipulate that the CCI has crossed -100 within the last 5 days. Is there a way to do this without writing IF and OR statements for each day? ie. bar -1, bar -2, etc. ?
profile picture


Yes. In Rule-based strategies, use Multi-Condition Groups. For more details, see the Wealth-Lab User Guide > Strategy Window > Strategy Builder > MC, Multi-Condition Group.

In code-based strategies, use Series is Above a Value or its antagonist function from our Community Indicators library depending on your condition. Example:

Please log in to see this code.
profile picture



Thank you for completely answering my question and more.