Automatically syncing studies between two computers

Questions about MultiCharts and user contributed studies.
Xyzzy
Posts: 162
Joined: 19 Mar 2011
Has thanked: 43 times
Been thanked: 79 times

Automatically syncing studies between two computers

Postby Xyzzy » 10 Oct 2011

I'm running MultiCharts on two computers -- a notebook for coding and performing "lightweight" tests that aren't too processor-intensive, and a desktop with a faster CPU for running longer tests, like large portfolio backtests and optimizations with lots of symbols.

The problem is that I have to manually keep the code for my various studies "in sync." E.g., if I write a new signal on my notebook, I then have to copy-and-paste that code onto the desktop. Likewise, if I then make an edit to that signal on the desktop, then I have to copy-and-paste that change back onto my notebook. It's easy to make a mistake and forget to update the code on one machine, in which case I have different sets of code on the two machines.

Is there any known way to "automagically" keep the studies for the two computers in sync? From what I can tell, both the compiled and uncompiled studies are stored in this folder (including various subfolders):

C:\ProgramData\TS Support\MultiCharts\StudyServer

Would it be possible to use some syncing software (like Dropbox or the equivalent) to monitor these folders on both the notebook and the desktop, look for changes to the studies on one computer, and then automatically update the other computer with any changes? Or would this cause some risk of internal problems/corruption for MultiCharts? Has anyone had success with doing so? Thanks in advance.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Automatically syncing studies between two computers

Postby Henry MultiСharts » 12 Oct 2011

Hello Xyzzy.
I believe "Dropbox" gives user the ability to synchronize folders from two PCs automatically.
You can find more information about this software over the Internet.

User avatar
siscop
Posts: 197
Joined: 09 Jan 2011
Has thanked: 34 times
Been thanked: 29 times

Re: Automatically syncing studies between two computers

Postby siscop » 30 Nov 2011

Is this the only folder that has to be sync?
C:\ProgramData\TS Support\MultiCharts\StudyServer

Is someone successfully using Dropbox or any other software to sync their MC Studies, indicator, marketdata and symbols?
Should a other software be preferred for any reason?
I use 2 licenses on 2 PCs that should be sync.
One PC is the 24/7 tradingcomputer and the other one is the testingcomputer.
Could that come to a conflict when both computers wants to update the marketdata? How do u solve this problem?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Automatically syncing studies between two computers

Postby Henry MultiСharts » 30 Nov 2011

The databases and studyserver folders can be found here:

Vista/Windows 7 : %allusersprofile%\TS Support\MultiCharts
Windows XP: %allusersprofile%\Application Data\TS Support\MultiCharts

In order to sync them between two PCs you need to close Multicharts and all of its processes on both PCs and share two entire folders between PCs.

It is recommend to run the same versions/builds of MultiCharts on both PCs to avoid any issues.

Xyzzy
Posts: 162
Joined: 19 Mar 2011
Has thanked: 43 times
Been thanked: 79 times

Re: Automatically syncing studies between two computers

Postby Xyzzy » 30 Nov 2011

For what it's worth, I managed to set this up using Dropox. I only syched the contents of the StudyServer folder, not the databases. It seems to work fine.

One tricky issue is that by default, Dropbox will only sync items that are stored within the Dropbox folder. However, MultiCharts expects the studies to be located in a different folder (outside of the Dropbox folder).

To work around this, I kept the StudyServer folder in its default location. I then created a symbolic link to that folder in the Dropbox folder. This tricks Dropbox into thinking that the contents of the StudyServer folder are stored in the Dropbox folder, even though they aren't. The process is a bit complex, but here are some explanations:

http://www.paraesthesia.com/archive/201 ... links.aspx

http://techie-buzz.com/how-to/using-sym ... opbox.html

There's a utility that can automate this. I haven't tried this, but it might be easier to use.

http://satyadeepk.in/dropbox-folder-sync/

Xyzzy
Posts: 162
Joined: 19 Mar 2011
Has thanked: 43 times
Been thanked: 79 times

Re: Automatically syncing studies between two computers

Postby Xyzzy » 24 Mar 2012

An update:

This page has a good summary of different ways to sync folders outside of your Dropbox folder using Dropbox:

http://www.dropboxwiki.com/Sync_Other_Folders

I did it pretty quickly from the command line with the "mklink" command (which is built-in to Windows Vista and Windows 7). To do this:

1. Move the contents of the folders you want to sync into the Dropbox folder.

2. Open a command prompt using the "run as administrator" mode.

3. Type the following command in the command prompt: "mklink /j [path of outside directory] [path of directory in Dropbox]

For example, I wanted to sync the contents of the StudyServer folder in Dropbox. I moved that folder into the folder "Dropbox\MultiCharts\", and then used the following command:
mklink /j "C:\ProgramData\TS Support\MultiCharts64\StudyServer\" "C:\Users\Robert\Dropbox\MultiCharts\StudyServer\"
This results in the actual contents of the StudyServer folder being stored in Dropbox, so it can be synced with other computers, while creating a symbolic link to that folder within the MultiCharts64 folder.


Return to “MultiCharts”