Controlling Multicharts by an external program

Questions about MultiCharts and user contributed studies.
dahmen walter
Posts: 73
Joined: 19 Oct 2007
Has thanked: 46 times
Been thanked: 4 times

Controlling Multicharts by an external program

Postby dahmen walter » 02 Dec 2020

Hello,

I have a setup of alerts generating alerts and sending out alerts via email.
Monitoring all daily data for stocks from S&P 1000 is done by workspaces covering the underlying sector, one workspace for each sector.
So I have to load these workspaces to generate the alerts sent out manually and after the other and this takes including loading from barchart about 30 minutes.
I wanted to automate this via sendkeys but MultiCharts is reluctant to accept these virtual keystrokes.
Therefore I created a solution in VB.NET using ProcessID as follows:
MC_Start = System.Diagnostics.Process.Start("Path\MultiCharts64.exe", "Path\MyWorkspace1.wsp")
Threading.Thread.Sleep(150000)
'MC_Start.Kill()
'MC_Start.Dispose()
'Threading.Thread.Sleep(1800)
'-------repaeating up to ------------------------------------------
MC_Start = System.Diagnostics.Process.Start("Path\MultiCharts64.exe", "Path\Myworkspace15.wsp")
'Threading.Thread.Sleep(150000)
'MC_Start.Kill()
'MC_Start.Dispose()
'Threading.Thread.Sleep(1800)

Dispose allone does not close MC - Kill is necessary.

This works for 6 to 10 iterations but then connections to some or all of Barchart Forex instruments is lost and can only be restored by complete restart of all Multicharts processes - connectivity to IB is not impaired.

Is this approach systematically biased? I can load all data manually without any problems.
Would IqFeed be without this problem? This would make me switch after all in the end if the interface is more robust.
If someone has already a working process for this problem I would be glad to learn about it.

Thanks for comments in advance.

Return to “MultiCharts”