Is there a simple way to send an SMS email alert, in the event of data feed outage?
Was thinking maybe something event driven within the script that monitors tick bar movement and sends the alert after so many seconds of inactivity
Send email alert upon data feed outage [SOLVED]
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Send email alert upon data feed outage
I tested this out on a one second chart using IQFeed(tick) and it doesn't seem to work. I tried stopping/starting the feed through IQFeed App to trigger the alert, and also exited the IQFeed App while real-time data was flowing. Neither triggered it, regardless of whether SA (Strategy Automation) was enabled or not. Alerts configured and tested successfully in strategy properties. No issues thereHere is a sample code to check for absence of realtime data:The code will generate an alert of the selected type intrabar if there is no realtime data for more than 30 seconds.Code: Select all
[IntrabarOrderGeneration = true]
Vars: intrabarpersist counter(0);
Recalclastbarafter(5);
counter = IFF(getappinfo(aicalcreason) = calcreason_timer, counter + 1, 0);
if counter > 6 then alert("No realtime > 30 sec");
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Send email alert upon data feed outage
I tested this out on a one second chart using IQFeed(tick) and it doesn't seem to work. I tried stopping/starting the feed through IQFeed App to trigger the alert, and also exited the IQFeed App while real-time data was flowing. Neither triggered it, regardless of whether SA (Strategy Automation) was enabled or not. Alerts configured and tested successfully in strategy properties. No issues thereHere is a sample code to check for absence of realtime data:The code will generate an alert of the selected type intrabar if there is no realtime data for more than 30 seconds.Code: Select all
[IntrabarOrderGeneration = true]
Vars: intrabarpersist counter(0);
Recalclastbarafter(5);
counter = IFF(getappinfo(aicalcreason) = calcreason_timer, counter + 1, 0);
if counter > 6 then alert("No realtime > 30 sec");
The code asks for a check every 5 seconds . . .
if no data was received in 6 checks (ie 30 seconds), then send an alert.
but your chart is a ONE sec chart, therefore the trigger condition was NEVER met.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Send email alert upon data feed outage
Thanks TJ. How can I adjust for this? Would adjusting check to every 1 second and counter > 30 allow a trigger?
Make a one-minute chart and apply this indicator to it.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Send email alert upon data feed outage
I can do that, but my goal is to implement the 30 second alert on one second chart.
Does it matter?
When you have a one-second chart that is executing your trading strategy... and you have a 2nd chart on the side that is on a one-minute interval. When the data feed goes off-line, it will be off-line on both charts.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Send email alert upon data feed outage
I figured it out. Thanks
Are you going to share with everyone the solution?
Re: Send email alert upon data feed outage
That makes sense. Just didn’t want to look like an idiot. It was actually an alert configuration problem. I changed check alert conditions from “On bar close” to “Every Tick” which allowed it to work on one second chart.Are you going to share with everyone the solution?