6. Integration with Microsoft Visual Studio 2010/2012/Express

From MultiCharts
Revision as of 08:22, 11 April 2014 by Henry Multicharts (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In MultiCharts .NET it is possible to develop indicators and signals not only in a pre-built editor, PLEditor.NET.exe, but in any other editor, for example, in a notepad, or in a more suitable editor such as MS VS 2010 and its freeware version, MS VS Express.


The Integration process between MultiCharts .NET and MS VS is very simple. The script for each study is stored in a separate file (*.cs or *.vb). Below are the default paths of the folders where these scripts are stored:

  1. For MultiCharts .NET64 -  %allusersprofile%\Application Data\TS Support\MultiCharts .NET64\StudyServer\Techniques\CS\
  2. For MultiCharts .NET -  %allusersprofile%\Application Data\TS Support\MultiCharts .NET\StudyServer\Techniques\CS\

The Source file name is important. It is formed from the name of the study, its type and extension (cs or vb). Example: “_TPO_.Indicator.CS” is the indicator with “_TPO_” name written in C#.


If the file is changed and these changes are saved, MultiCharts .NET will track them, accept the changes and compile the study. If this study was applied to the chart, then after successful compilation, the study will be re-created on the chart and the result of the changes will be seen immediately. Such an implementation allows the editing of source codes from anywhere.


Let’s discuss MS VS. You may want to ask why do you need MS VS if any editor can be used to work with the script. The answer is MS VS provides additional features:

  1. Debugging. In MultiCharts .NET there is no pre-built debugger for managed applications, that is why MS VS is required if debugging is essential for a developer.
  2. IntelliSence. PLEditor .NET supports highlighting of syntax, lists of methods and classes. As opposed to a pre-built PLEditor.NET, MS VS supports builds with target framework 4.0 and higher.
  3. Version Control System. MS VS supports numerous version control systems through special plug-ins. If a folder with studies is put under source control, then an already-made professional development environment can be used.


There are some cases when it is necessary to use a pre-built PLEditor .NET:


  1. Adding references to external assembly. For any study it is possible to add a reference to any other assembly and use its functionality. If the reference has been added in MS VS but has not been added in PLEditor .NET, then this study will be compiled without that reference. In this case the compilation will fail.
    NOTE: Any reference to the other assemblies should be added ONLY via PLEditor .NET.
  2. Compilation mode. PLEditor .NET has 2 configurations (Debug, Release).
PL.NET


Debug configuration is required for development and debugging of the studies. Release configuration is required for the final assembly. When the compilation is started in editor, MultiCharts .NET remembers what compilation mode was used. With future background compilations, when studies scripts are changed and saved from MS VS or any other editor, the most recent mode parameters will be used.