Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Thought to ask what you guys use to monitor that your multicharts strategies are running and have not hung up or switched themselves off?
I trade on MC and TWS. TWS I can easily monitor from a physically different location that the the TWS port is available and TWS consequently has not crashed. But I have found it quite difficult to monitor that the automated strategies are still running in Multicharts.
I can monitor MC's text-logfiles that it has not lost connection to TWS(if I find a windows-program for that) but I would really like to monitor that the SA is still running.
How have you guys managed to solve this?
Can you help answer these questions from other members on NexusFi?
I usually leave my strategies running for a week and check in on them a couple of times a day. The less the better
So I need to set up some KISS type of alarm if there is something wrong. The most frequent problems have been:
1. TWS crashed, this is monitored now using monit from another location.
2. MC strategies turned off, this is not monitored yet.
Checking for automated strategies that are on or off can be done with GetAppInfo(aiStrategyAuto) which will give an value of 1 if automated trading execution is on, else a 0. With the RecalcLastBarAfter keyword, you can force a script to check this every x seconds.
Try SnakeTail, one of the best programs for monitoring large text files, and also let you highlight specific words.
How you should/can monitor that, depends on why the strategies are turned off. For example, if this is caused by a connection loss for x seconds which turns the automated trading of, the GetAppInfo() will reflect that. However, if the strategy stops because MC has crashed, then that won't work. And if the strategy stops because your computer has freezed, well then nothing in terms of giving an alert works.
What you can do to, is print every x minutes to an log (perhaps on a network drive or something like a DropBox folder) the current time and something like "still running". Then you can monitor this text file, and if that log don't update after x-minutes, MultiCharts hangs or your pc has crashed.
True, but as I today noticed, you can't see there if (and why) a data feed has stopped updating (Btw Nikke, you also may want to program something for that).
If the PC or tws crashes it is caught by the tws port-availability-monitoring from another location. This also catches network connection loss regardless of what causes it.
Thank you Jura a lot for the good tips, I think it gave me enough ideas to also get a working solution to monitor the most important other scenarios.
Just writing it up here so maybe others can use similar solution.
After some research I am settling for a solution like this:
1. Strategies write to a textfile when they are running.
2. These textfiles are available over lighttpd
3. Monit from another physical location checks that these textfiles are constantly updated.
This seems to be the most simple solution that can catch some different scenarios that can go wrong (eg. strategy turned off, MC crash), and I can use tools I know.