Hi everyone,
I have been evaluating MC.Net and I am a little confused about the integration with VS. I've read the documentation and some faq/forum. I am not a professional programmer, but have VS Pro and done some c# development.
When I want to use a certain calculation in my strategy and display as an indicator in the chart, I can either
a) copy/paste code into both (indicator / signal) and hope/try to keep the code in sync
b) use a function, which I can't edit or debug in VS
Q: So basically I can't develop or debug any shared code in VS?
From my understanding, most indicator calculations must be shared, because I can't display anything in the chart out of the strategy.
IMHO this is extremely inconvenient, but how do you handle this? Am I missing something major?
Cheers
KaBo
Use of Functions / Shared Code in VS [SOLVED]
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Use of Functions / Shared Code in VS
Hello KaBo,
The functions created by the user in PowerLanguage .NET editor can be accessed from Visual Studio.
If you need to transfer values from the signal into an indicator - please see this post for more info: MultiCharts .NET FAQ
You can also use the new functionality we have introduced in MultiCharts 9.0 - an indicator can now plot the values received from a signal using IStrategyPerformance.SetPlotValue and IStrategyPerformance.GetPlotValue.
The functions created by the user in PowerLanguage .NET editor can be accessed from Visual Studio.
If you need to transfer values from the signal into an indicator - please see this post for more info: MultiCharts .NET FAQ
You can also use the new functionality we have introduced in MultiCharts 9.0 - an indicator can now plot the values received from a signal using IStrategyPerformance.SetPlotValue and IStrategyPerformance.GetPlotValue.
Re: Use of Functions / Shared Code in VS
Hello Henry,
thanks, I have to read up and play around with the indicator in strategy concept.
However, to the base question, you wrote:
Cheers
KaBo
thanks, I have to read up and play around with the indicator in strategy concept.
However, to the base question, you wrote:
In the project files there are only the indicators and signals. I can't find a way to access functions in my VS environment, so could you please point me to some description to do it.The functions created by the user in PowerLanguage .NET editor can be accessed from Visual Studio.
Cheers
KaBo
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: Use of Functions / Shared Code in VS [SOLVED]
You need to create the function in PowerLanguage .NET editor first.
Please go to PowerLanguage .NET editor->File->New->Function.
Create a function with the code that you need.
Now you can load it in VS.
Please go to PowerLanguage .NET editor->File->New->Function.
Create a function with the code that you need.
Now you can load it in VS.