Alert -- If Realtime Data is Disconnected

Studies that have been contributed to the community by other users. If you’ve got something useful to share, that’s great!
User avatar
Henry MultiСharts
Posts: 8443
Joined: 25 Aug 2011
Has thanked: 1207 times
Been thanked: 2703 times

Alert -- If Realtime Data is Disconnected

Postby Henry MultiСharts » 10 Jan 2013

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");

Create a new signal, paste this code and compile it or import the attached pla file.
Once you add it to your chart make sure you have alerts enabled in Format->Strategy properties->Alerts tab. More info on the strategy alerts in the Wiki.
The code will generate an alert of the selected type intrabar if there is no realtime data for more than 30 seconds.

Image
Attachments
No realtime data alert.png
No realtime data alert.png (5.15 KiB) Viewed 2644 times
No realtime data alert.pla
(1.5 KiB) Downloaded 383 times

bomberone1
Posts: 146
Joined: 02 Nov 2010
Has thanked: 7 times
Been thanked: 9 times

Re: Alert -- If Realtime Data is Disconnected

Postby bomberone1 » 06 Oct 2016

If the internet is ok but real time data is disconnected how could i recive a gmail email?
Please tell me all single step do to?

How could i recive a sms by italian mobile phone +39 , that use company like
TIM:
https://www.tim.it/

Vodafone:
http://www.vodafone.it/

Wind:
http://www.wind.it/it/privati/

Or API SMS services like:
http://textbelt.com/
https://www.twilio.com/sms
http://www.wegusinfotech.com/Transactio ... iders.html
https://www.kitel.it/

I'd like also recive sms by Telegram.

Thanks


Return to “User Contributed Studies and Indicator Library”