We can create indicators, trading strategies, and functions in the PowerLanguage .NET Editor. But how can we ensure that our scripts are backed up properly?

The PowerLanguage .NET Editor and the script files

The PowerLanguage .NET Editor is the primary tool for working with MultiCharts .NET scripts. Besides creating scripts (such as indicators and trading strategies) in this code editor, we’re also able to import scripts and remove scripts with it. Furthermore, in the PowerLanguage .NET Editor we can also manually export scripts for backup purposes.

But manual backups are tedious and easy to forget. And while a backup kept on the same computer can help when we accidentally overwrite an existing script during script import, it doesn’t help much with a fatal computer crash or other hardware issues. Luckily, we can backup MultiCharts .NET scripts into the cloud for an more robust backup of our work. This requires getting a cloud storage account and changing the location of where MultiCharts .NET stores its scripts. Let’s examine how to do both.

Storing files in the cloud for free with Box

Box is a provider of free cloud services and currently offers a free personal account with 10 GB of storage and a maximum file size of 250 MB. It promotes itself with security features, easy syncing, and accessing content from several devices – features that companies like Dropbox and SpiderOak also offer.

(Disclaimer: I chose Box because they’re popular and offer a free account; not to promote or recommend them).

Registering a free account with Blox.com

To use Box we need an account. So we navigate to www.box.com and click on ‘Sign Up’:

Box.com website

On the sign-up page we select ‘Personal Plans’ and click on ‘Sign Up’ to select the free plan:

Choosig a personal Box.com plan

Then we fill in the form and click ‘Continue’:

Creating a Box.com account

After that we’ll need to confirm our email address:

Confirming the email address

So open the inbox and click on the link to verify the provided email address:

Confirm email on Box.com

That email link brings us to a welcome message on the website:

Welcome to Box.com

Installing the Box Sync app

Click through the ‘Getting Started with Box’ explanation and then click on the button to download the ‘Box Sync’ desktop app:

Download Box Sync from the Box.com website

Then proceed with downloading the .exe file:

Download Sync setup file

We then open the download file and choose ‘Run’ in the ‘Security Warning’ window:

Windows security warning for downloaded file

The ‘Box Sync’ installation program now starts. To install, accept the terms and conditions and click ‘Install’:

Box Sync agreement

There are no other options and so the program begins installing:

Setup of Box Sync

After the installation completes, we’re asked to reboot the computer:

Box Sync installation complete

Configuring the Box Sync application

After rebooting, the ‘Box Sync’ app pops-up prompting us to log in. So we provide the email address and password followed by pressing ‘Log In’:

Box Sync login

After that we’re welcomed to ‘Box Sync’. To change the Box Sync default folder location to something more general for backups, we need to click on the ‘Customize Folder Settings’ option in this window:

Welcome to Box Sync screen

We then press the ‘Change’ button to select a new default location:

Change default folder in Box Sync

We can now select where the folder will be placed. For convenience, let’s place the folder in C:\ . Then we press ‘OK’:

Box Sync - choosing a custom folder

After that we click ‘Done’ in the ‘Box Sync’ window:

Confirm Box Sync app settings

That brings us back to the ‘Welcome to Box Sync’ screen. By the way, once the program syncs for the first time we can’t change the default folder location anymore. The ‘Customize Folder Settings’ option only becomes available again after we remove the Box Sync program and reinstall it.

After changing the default folder location, we press ‘Start Syncing’:

Box Sync app - start syncing

A couple of seconds later the program has completed its initial syncing:

Box Sync app - syncing done

Changing the default location of MultiCharts .NET scripts

To keep our backups organised, let’s make a folder named ‘MultiCharts .NET scripts’ in the C:\Box Sync\ folder. After making it, a little icon in the bottom left corner shows that it’s a sync folder:

Folder synced with Box.com

We now need to move all MultiCharts .NET scripts to that folder so that the Box Sync app can upload them to the cloud storage. To do so, we start the main MultiCharts .NET program and then click on the ‘File’ menu item and choose ‘Preferences’:

File menu of MultiCharts .NET

We then select the ‘Directories’ tab. Here we can change the location of the database, cache, studies, logs, and Order and Position Tracker files (MultiCharts Wiki, 2014). Studies are, by the way, the collective term that MultiCharts .NET uses for indicators, trading strategies, and functions (MultiCharts Wiki, 2013).

MultiCharts .NET directories settings

MultiCharts .NET scripts are by default stored in C:\ProgramData\TS Support\MultiCharts .NET64\StudyServer\ (for the 64-bit version). Please note where the studies are currently stored on your computer; we’ll browse to that folder later on.

Tip: This article only addresses creating a backup of MultiCharts .NET scripts. A complete backup will also include the database, workspaces, custom study workspaces, symbol mapping data, and the Order and Position Tracker data.

In the ‘Preferences’ window we click on the button that’s to the right of the ‘Studies’ field. That opens the ‘Browse for Folder’ window to select a new location for the scripts. We select the ‘MultiCharts .NET scripts’ folder that we’ve just created and press ‘OK’:

Browse for new MultiCharts .NET scripts folder

The ‘Studies’ location in the ‘Preferences’ window now changes to the selected folder:

New folder for MultiCharts .NET studies

Now press ‘OK’ in the ‘Preferences’ window and then close MultiCharts .NET.

Moving MultiCharts .NET scripts to folder synced by Box

We now open a Windows Explorer window and navigate to the original location of the MultiCharts .NET scripts. There we find the ‘Techniques’ folder:

Move MultiCharts .NET's Techniques folder

That folder needs to be moved to the ‘MultiCharts .NET scripts’ folder that we created earlier:

MultiCharts .NET's Techniques folder moved

To verify if relocating these folders went well, we start the PowerLanguage .NET Editor and see that the scripts are still there in the ‘Studies’ window:

Studies overview in the PowerLanguage .NET Editor

Likewise, after starting the MultiCharts .NET the scripts are also still there:

Studies overview in the Insert Study window

Downloading a MultiCharts .NET script backup from Box

To see the uploaded contents of the ‘MultiCharts .NET scripts’ folder, we right-click on the Box icon in the Windows taskbar and select ‘Open Box Website’:

Open Box website

We then need to login on the website:

Login to Box website

After logging in we find the ‘MultiCharts .NET scripts’ folder that, in this case, contains 551 files:

MultiCharts .NET scripts stored on Box

We browse that folder by clicking on it. To locate the individual scripts, we need to navigate to the ‘MultiCharts .NET scripts\Techniques\CS\’ folder:

List of MultiCharts .NET scripts uploaded to Box

To download an individual script, we right-click on it and choose ‘Download’:

Download MultiCharts .NET script from Box.com

Or we can download all scripts by right-clicking on the ‘CS’ folder and choosing ‘Download’:

Download full backup of all MultiCharts .NET scripts from Box.com

That gives a zip file with all files for easy downloading:

Zip file with all MultiCharts .NET scripts

Other ways to use Box is installing the Box Sync app on another computer also and sync MultiCharts .NET scripts between those computers. Note that this can give file conflicts when both computers are working on the scripts at the same time.

For more on MultiCharts .NET scripts, see creating trading strategies, indicators, and functions. We can also export scripts for a manual backup and then import them again in the PowerLanguage .NET Editor.

Summary

We can create a manual backup by exporting scripts from the PowerLanguage .NET Editor. However, a more convenient and fail-safe way of backing up scripts is storing them into the cloud. In order to sync the scripts with the online storage, we need to change the default location of MultiCharts .NET script to whichever folder is used by the synchronisation app.


References

MultiCharts (2014). MultiCharts .NET Programming Guide (version 1.1). Retrieved from http://www.multicharts.com/downloads/MultiCharts.NET-ProgrammingGuide-v1.1.pdf

MultiCharts Wiki (2013, May 6). Using Studies (PowerLanguage Editor). Retrieved on July 16, 2015, from https://www.multicharts.com/trading-software/index.php/Using_Studies_%28PowerLanguage_Editor%29

MultiCharts Wiki (2014, May 21). How to Move MultiCharts Database, Studies and Logs from C Drive (Starting from 8.7 Version). Retrieved on August 15, 2015, from http://www.multicharts.com/trading-software/index.php/How_to_Move_MultiCharts_Database,_Studies_and_Logs_from_C_Drive_%28Starting_from_8.7_Version%29