Getting System and DataFeed Status-useful with remote dsktop  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
juliomac
Posts: 10
Joined: 21 May 2011
Has thanked: 2 times
Been thanked: 4 times
Contact:

Getting System and DataFeed Status-useful with remote dsktop

Postby juliomac » 07 Apr 2014

Hi everyone !

I am starting to use a virtual machine (namely, rackspace.com) to run my 24/5 Forex system.

To make sure everything is running well there, I have tried with no success to write two Easy Language codes:

1 - A simple code that sends me an e-mail each "x" minutes ("x" defined in the Input session) saying just "System running well". As I am running daily bars, if I use "once per bar" option, for each Xth minute I just get the first alert and, if I use "Every tick", I get tons of e-mails during that Xth minute. Something tells me that there is a smarter approach to this.

2 - A code that checks the MultiCharts connection with Interactive Brokers (my datafeed and broker) and, if it is lost for more than 5 minutes, MultiCharts send me an e-mail with "IB Connection lost > 5min".

As I use an iCloud e-mail with iPhone (push on) to receive alerts, I usually get them a few seconds after they are generated.

Any ideas?

Julio Machado

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

Re: Getting System and DataFeed Status-useful with remote ds

Postby TJ » 07 Apr 2014

Hi everyone !
I am starting to use a virtual machine (namely, rackspace.com) to run my 24/5 Forex system.
To make sure everything is running well there, I have tried with no success to write two Easy Language codes:

1 - A simple code that sends me an e-mail each "x" minutes ("x" defined in the Input session) saying just "System running well". As I am running daily bars, if I use "once per bar" option, for each Xth minute I just get the first alert and, if I use "Every tick", I get tons of e-mails during that Xth minute. Something tells me that there is a smarter approach to this.
::
You can add your alert indicator to a 5 minute chart,
let the alert check "once per bar", then you will have a continuous connection review every 5 min.

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

Re: Getting System and DataFeed Status-useful with remote ds

Postby TJ » 07 Apr 2014

::
2 - A code that checks the MultiCharts connection with Interactive Brokers (my datafeed and broker) and, if it is lost for more than 5 minutes, MultiCharts send me an e-mail with "IB Connection lost > 5min".
::
See this post:
viewtopic.php?f=5&t=9890

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Getting System and DataFeed Status-useful with remote ds  [SOLVED]

Postby JoshM » 11 Apr 2014

(...)
1 - A simple code that sends me an e-mail each "x" minutes ("x" defined in the Input session) saying just "System running well". As I am running daily bars, if I use "once per bar" option, for each Xth minute I just get the first alert and, if I use "Every tick", I get tons of e-mails during that Xth minute. Something tells me that there is a smarter approach to this.
(...)
Why not send an e-mail when the system is not running well anymore? There is much more information value in an e-mail saying "System not running well anymore; please check" than saying everything is okay.

User avatar
juliomac
Posts: 10
Joined: 21 May 2011
Has thanked: 2 times
Been thanked: 4 times
Contact:

Re: Getting System and DataFeed Status-useful with remote ds

Postby juliomac » 15 Apr 2014

Hi,

I have been using the prosaic solution to add an alert indicator to a 30 minute chart, receiving the e-mails each 30 minutes.

However, the solution posted by JoshM here:

http://www.multicharts.com/discussion/v ... f=5&t=9890

...is much more interesting as it sends an e-mail WHEN a problem happens.

I will try to put this approach in action as soon as possible. While I do not use Auto-Trade, I get my data from Interactive Brokers and it should work.

Thank you all,

Julio

wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

Re: Getting System and DataFeed Status-useful with remote ds

Postby wilkinsw » 16 Apr 2014

In addition to the: Loss of Broker connection and Loss of realtime data feeds (let me know if you want my code for these).

I also use a template chart and a copied live chart to compare key calculated variables and positions (of template vs broker) with Global variables. Then fire off an alert if they don't match.

For PC/server connectivity/performance monitoring I use:

R-U-ON.com

mobilepcmonitor.com

I use emails (outlook.com for push) and iphone VIP + iprioritymail app to sound the alerts.

wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

Re: Getting System and DataFeed Status-useful with remote ds

Postby wilkinsw » 17 Apr 2014

Also I use:

charts with two datafeeds (same symbol):

datafeed1: IQfeed
datafeed2: Broker data

Any significant mismatch between the two for the current close (ie current price) for more than 30 seconds sends an alert:
inputs:seclag(30);
vars: intrabarpersist c1(0), intrabarpersist c2(0),vthres(0);
vthres=((3/pricescale)*minmove);


c1=close of data1;
c2=close of data2;

var: intrabarpersist counter(0),intrabarpersist switchv(0),
intrabarpersist alertp(0);

if (c1+vthres<c2 or c1-vthres>c2) and switchv=0 then begin
counter=Timetoseconds(currenttime_s);
switchv=1;
end;

if switchv=1 and ((Timetoseconds(currenttime_s))-counter)>=seclag then begin
alertp=1;
alert ("PATS:IQ lag");
switchv=0;
end else begin
alertp=0;
end;


if c1=c2 then
switchv=0;

plot1(alertp,"alertp");

RecalcLastBarAfter(30);
I'm sure the coding is not perfect but it does the job! It covers the situation where MC has lost connection with the broker without MC knowing it. Ie your broker loss of connection might no go off and this is another way of checking broker connectivity.

I use 1min bars with 10 bar history for these charts. You can setup charts for every symbol you trade or just for a couple.


Return to “MultiCharts”