IronPython  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
sdnian
Posts: 4
Joined: 03 Sep 2012
Has thanked: 17 times
Been thanked: 1 time

IronPython

Postby sdnian » 08 Sep 2012

Does IronPython avaiable in MC.NET ?

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

Re: IronPython  [SOLVED]

Postby Henry MultiСharts » 10 Sep 2012

Sdnian, you cannot write IronPython code directly in MultiCharts.Net but you can call IronPython code from MultiCharts.Net. You need to do the following:

I. Download and Install IronPython 2.7.3 from this page
II. In MultiCharts.Net create an indicator named “Test_IronPython” with the code from attached file Source.txt
III. In Reference settings of this indicator you need to specify all assembly files from the following folder (For Windows 64-bit): c:\Program Files (x86)\IronPython 2.7\Platforms\Net35\

The following 8 Dll files:
1. IronPython.dll
2. IronPython.Modules.dll
3. IronPython.SQLite.dll
4. Microsoft.Dynamic.dll
5. Microsoft.Scripting.dll
6. Microsoft.Scripting.AspNet.dll
7. Microsoft.Scripting.Core.dll
8. Microsoft.Scripting.Metadata.dll

IV. Compile “Test_IronPython” indicator in MultiCharts.Net Editor
V. Create a folder c:\Temp\TestPy\ and paste the attached file Test.py (filepath is specified in MC .Net indicator code). If you need to change the path-change it in MC .Net indicator code
VI. Apply the indicator to the chart in MultiCharts

Result: Indicator adds 100 to the current Close value, using IronPython code.

Test.py study description:
Simple class has been created in the script. This class has two methods: add and minus taking two objects as arguments and executing corresponding mathematical actions
You can check ironpython help file to find more information on using ironpython in C# or search for more information over the Internet.
Attachments
Test.zip
(8.07 KiB) Downloaded 440 times


Return to “MultiCharts .NET”