Hello George,
The vFlag variable I used in the code example is the method you need to incorporate to stop the "flooding." Make sure the setCompute feature is unchecked, or set to false. You may need to use several flags, one for each different condition. When the condition for the alert first occurs, allow the code block to execute and then set it's flag inside the code block to "true." In your if statement that checks for the alert condition, add " && vFlag == false" to prevent the code block from executing subsequent times during the same bar. Then add a routine to the top of your formula that resets your flags at the instance of a new bar like I've done in test1.efs using getBarState(). Test the code examples I gave you and you'll see the behavior. The alert condition will only occur once per bar, which I think is what you are attempting to achieve. Correct?
The vFlag variable I used in the code example is the method you need to incorporate to stop the "flooding." Make sure the setCompute feature is unchecked, or set to false. You may need to use several flags, one for each different condition. When the condition for the alert first occurs, allow the code block to execute and then set it's flag inside the code block to "true." In your if statement that checks for the alert condition, add " && vFlag == false" to prevent the code block from executing subsequent times during the same bar. Then add a routine to the top of your formula that resets your flags at the instance of a new bar like I've done in test1.efs using getBarState(). Test the code examples I gave you and you'll see the behavior. The alert condition will only occur once per bar, which I think is what you are attempting to achieve. Correct?
Comment