I created an indicators which sends me email alerts whenever the completed candle includes the value of a moving average, SMA(30). I typically use that on a 60 min charts.
I recently ran into an issue where it would have been nice to get the alert 15 minutes prior the the 60 min bar completion.
I can think of two solutions:
1. CalculateOnBarClose = false, but in that case I need to tell the script to send me an email alert only once and hold on for a while, or else I will end up will hundreds of emails, one for every incoming tick where the 60 min candle includes the value of SMA(30). Which function/code allows me to do that?
2. Use a multiple time frame approach where I would use the indicator with CalculateOnBarClose = true on a 15 minutes chart. But the indicator would check for the occurrence of 60_min_in_progress_candle = SMA(30). Can this be done?
Thanks in advance.
-MarcusPlexus
Comment