Hi guys,
I have indicator sending notifications.
I want to limit sending notifications to one or "n" per Period set on chart.
Do you have any idea how to limit it?
Yes, use the Search in the top right corner of this page . . . try once per bar
Hi guys,
I have indicator sending notifications.
I want to limit sending notifications to one or "n" per Period set on chart.
Do you have any idea how to limit it?
Thanks for help in advance.
Hello I have the same issue. After the signal notifications are shooting me. Did you get a solution how to use only the first signal or limit them??
I guess that you did try a search and that is how you found this old post.
It is relatively simple to do depending on how you want notifications limited by using a globally declared variable initially set to 0.
If you only want 1 notification per signal direction
If a buy signal, send notification and set the variable to 1
If a sell signal, send notification and set the variable to -1
When the code wants to send notification, check the value of the variable. If it is 1 don't send notifications for a buy signal. If it is -1 don't send notifications for a sell signal.
If you only want 1 notification per bar, make the variable datetime
When sending the notification save the value of Time[0] in the variable
Only send notifications if Time[0]!=the variable.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys,
I have indicator sending notifications.
I want to limit sending notifications to one or "n" per Period set on chart.
Do you have any idea how to limit it?
Thanks for help in advance.