For a PlaySound alert in Formula Wizard:
"Everytime" means that the sound plays on every tick that the formula condition is met. If the condition is met for every tick in a 1 min. bar, then the sound will play constantly for the entire minute. If the condition is met constantly for several minute bars, then the sound will play constantly for those several minutes.
"The first time" means that the sound plays only once on the first tick of the formula condition being met. If the formula has 2 conditions, once the condition of Set1 is met and the sound plays, the sound alert will not play again for a Set1 alert until the condition of Set 2 is first met. So if the Set1 condition is met in one bar, the alert sounds, but will not sound again if the alert condition is met again in the next or future bars (until the Set2 alert is met, then the Set1 alert can trigger again).
In most cases, I'd say that neither the "Everytime", nor "The first time", are adequate options for sound alerts. What is needed is an option that plays the sound once at the first tick upon the condition being met, for each and every bar that the condition is met. Using the proposed option, the sound does not play constantly, nor does a Set2 alert have to occur after a Set1 alert before the Set1 alert can trigger again.
The proposed option text in the Wizard might be ". . . while the following will happen only the first time in every bar".
Pending addition of such an option in the Formula Wizard, what code can be manually entered into a Wizard formula to get the desired behavior for a PlaySound alert?
"Everytime" means that the sound plays on every tick that the formula condition is met. If the condition is met for every tick in a 1 min. bar, then the sound will play constantly for the entire minute. If the condition is met constantly for several minute bars, then the sound will play constantly for those several minutes.
"The first time" means that the sound plays only once on the first tick of the formula condition being met. If the formula has 2 conditions, once the condition of Set1 is met and the sound plays, the sound alert will not play again for a Set1 alert until the condition of Set 2 is first met. So if the Set1 condition is met in one bar, the alert sounds, but will not sound again if the alert condition is met again in the next or future bars (until the Set2 alert is met, then the Set1 alert can trigger again).
In most cases, I'd say that neither the "Everytime", nor "The first time", are adequate options for sound alerts. What is needed is an option that plays the sound once at the first tick upon the condition being met, for each and every bar that the condition is met. Using the proposed option, the sound does not play constantly, nor does a Set2 alert have to occur after a Set1 alert before the Set1 alert can trigger again.
The proposed option text in the Wizard might be ". . . while the following will happen only the first time in every bar".
Pending addition of such an option in the Formula Wizard, what code can be manually entered into a Wizard formula to get the desired behavior for a PlaySound alert?
Comment