Help with getting started
Hello,
I have installed ProtraderMC version 1.0.34 on Windows Desktop. I'm brand new to working with the tool and I'm still familiarizing myself with the UI and tools available.
I've created a project in AlgoStudio, but I am struggling with 2 things:
1.) I'm unable to view the C# dictionary. The dictionary loads fine, but when I switch to C# it only clears the panel. Am I doing something wrong or is this a bug?
2.) I'm familiar with how Visual Studio structures solutions and projects, but how does it work in AlgoStudio? So far I have a C# file called Project1.cs which is under My Scripts >> Strategies. Can I add more files with the logic I need to implement or do I have to do everything in the Project1.cs file?
Thanks for the help!
- Darin
Hello, Morris Darin!
1. I'm unable to view the C# dictionary.
It looks like you're using the x64 version of Algostudio. We'll add C# section to the dictionary (x64 version) soon.
In x32 version the C# dictionary is available at the moment.
Sorry for the inconvenience.
Also, this documentation can be useful :
Hi Darin.
2) When you use AlgoStudio, all logic should be in one file.
You also may use Visual Studio for editing and debug indicators and trading systems:
Run Visual Studio.
Create a new Visual C# project/ Class Library.
Chuse .NET Framework 3.5.
Add the necessary references:
Open the directory in which we have installed the client.
By default, the directory is C:\Users\
We need two
Add one system library System.Drawings.
Go to Project properties - > Build Events. Here we can immediately
specify the place where .dll file will be copied to after a
successful build of the project. This way of copying dll will result
to their immediate displaying in the Script lookup of the client.
By default: C:\Users\<user name>\Documents\ProtraderMC\My scripts\bin\indicators
Classes for Algotrading are in the namespace PTLRuntime.NETScript.
All indicators are the inheritors of the class NETIndicator.
Strategies, respectively, are the inheritors of the class NETStrategy.
After creating and buildin project indicator should appear in Indicators lookup in Custom group.
For debug script in Visual Studio open Tools - > Attach to Process.
Find netclient.exe in the active process list – this is ProtraderMC.
Attach project to it.
Put the breakpoint on the row which sets the indicator value.
We can see that the breakpoint has triggered.
Now we can start to debug the created script on the actual data.
When you use Visual Studio, you may use many files for you logic.
Regards,
Serge.