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

grtrader

#1
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

Eugene

#2
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:

CODE:
Please log in to see this code.
profile picture

grtrader

#3

Thank you for completely answering my question and more.