Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 02:23:06 +0000



Post From: 2 conditions, alerted only once each

[2021-09-21 16:21:13]
adam czuk - Posts: 26
Hey Sierra, I love the platform. Hoping you could help me out with this...

What I'm trying to do is get an alert when a bar touches one of two moving averages. For this I used a simple study alert on ONE of those moving averages, and instructed it to detect if the moving average is within the range of the current bar. My code looks like below as indicated between the # characters, where ID9 and ID10 are the moving avg studies..

#=OR(AND (H >=ID9. SG1,L <= ID9.SG1) ,AND (H >= ID10.SG1,L <= ID10.SG1))#

The issue is that a moving average fluctuates as the bar develops and often the average will repeatedly "peek" inside that bars range, then back.. causing the study to alert multiple times within an hour which is kind of annoying.

"alert only once per bar" fixes this somewhat, but I won't be notified when the second moving average is hit on that bar.

**What I'm trying to do is tell sierra to alert me only twice per bar, once for the 1st moving avg and once for the 2nd.**

I realize I could split it into two separate alerts, but am trying to do it in one because I have to switch these alerts on and off for multiple charts, which takes more time than toggling just one alert formula.