Send email alert upon data feed outage  [SOLVED]

Questions about MultiCharts and user contributed studies.
automaton
Posts: 47
Joined: 04 Apr 2017
Has thanked: 2 times
Been thanked: 4 times

Send email alert upon data feed outage  [SOLVED]

Postby automaton » 08 Aug 2018

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
Last edited by automaton on 08 Aug 2018, edited 1 time in total.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Send SMS alert upon data feed outage

Postby TJ » 08 Aug 2018


automaton
Posts: 47
Joined: 04 Apr 2017
Has thanked: 2 times
Been thanked: 4 times

Re: Send SMS alert upon data feed outage

Postby automaton » 08 Aug 2018

Disregard. Found a resolution, after a more thorough search :)

viewtopic.php?f=16&t=11715

automaton
Posts: 47
Joined: 04 Apr 2017
Has thanked: 2 times
Been thanked: 4 times

Re: Send email alert upon data feed outage

Postby automaton » 13 Aug 2018

Here is a sample code to check for absence of realtime data:

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 will generate an alert of the selected type intrabar if there is no realtime data for more than 30 seconds.
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 there

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Send email alert upon data feed outage

Postby TJ » 13 Aug 2018

Here is a sample code to check for absence of realtime data:

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 will generate an alert of the selected type intrabar if there is no realtime data for more than 30 seconds.
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 there

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.

automaton
Posts: 47
Joined: 04 Apr 2017
Has thanked: 2 times
Been thanked: 4 times

Re: Send email alert upon data feed outage

Postby automaton » 13 Aug 2018

Thanks TJ. How can I adjust for this? Would adjusting check to every 1 second and counter > 30 allow a trigger?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Send email alert upon data feed outage

Postby TJ » 13 Aug 2018

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.

automaton
Posts: 47
Joined: 04 Apr 2017
Has thanked: 2 times
Been thanked: 4 times

Re: Send email alert upon data feed outage

Postby automaton » 13 Aug 2018

I can do that, but my goal is to implement the 30 second alert on one second chart.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Send email alert upon data feed outage

Postby TJ » 13 Aug 2018

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.

automaton
Posts: 47
Joined: 04 Apr 2017
Has thanked: 2 times
Been thanked: 4 times

Re: Send email alert upon data feed outage

Postby automaton » 16 Aug 2018

I figured it out. Thanks

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Send email alert upon data feed outage

Postby TJ » 17 Aug 2018

I figured it out. Thanks

Are you going to share with everyone the solution?

automaton
Posts: 47
Joined: 04 Apr 2017
Has thanked: 2 times
Been thanked: 4 times

Re: Send email alert upon data feed outage

Postby automaton » 17 Aug 2018

Are you going to share with everyone the solution?
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.


Return to “MultiCharts”