Hi,
1. I want to put all my Function/Indicator/Signals into my own Folder under Study folder in .Net Power Editor. Works fine.
Study -> Functions ... MC functions
Study -> Indicators ... MC Indicators
Study -> Signals ... MC Signals
Study -> MyFolder -> Functions ... My Functions
Study -> MyFolder -> Indicators ... My Indicators
Study -> MyFolder -> Signlas ... My Signals
2. As C# Developer I want that namespaces will reflect my new Folder structure, so I changed namespace for my function to : PowerLanguage.MyFolder.Functions.MyFunctionName...
Compiles and works perfect. However, the only thing is on Power Editor - my function is marked with Red Circle as not verified? But there is no any error and function works in run time perfect.
Why it is happening? Can I fix it?
My own namespace for function [SOLVED]
Re: My own namespace for function
my idea, not verified:
it's a bit supprising to me that it works.... must mean that multicharts can use the binary compiled by visual studio. What version of visual studio are you using?
I think Power Editor expects all your code to be in it's single folder. if not, it won't watch the file for changes, meaning "hot editing" won't work.
it's a bit supprising to me that it works.... must mean that multicharts can use the binary compiled by visual studio. What version of visual studio are you using?
I think Power Editor expects all your code to be in it's single folder. if not, it won't watch the file for changes, meaning "hot editing" won't work.
Re: My own namespace for function
Yes, I agree with you. The only thing we can is just to create new folders only(!) under Power Language Editor which still keeps everything within single folder on the disk.
We should never mess with namespaces, will not work.
We should never mess with namespaces, will not work.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2958 times
Re: My own namespace for function [SOLVED]
Hello sylfvdk
PowerLanguage .NET Editor searches for functions only inside PowerLanguage.Function namespace.
If a function is declared in a different namespace - PowerLanguage .NET Editor does not treat it as a function, but as a class.
The Red or Green indication next to a study in the PowerLanguage .NET Editor is not only compiled/cont compiled status, but also ready/not ready and verified as its type or not. So the study can be compiled and ready, but not treated as its type (a function) by PowerLanguage .NET Editor. In this case it will work ok, but will have a red indication next to it in the editor.
PowerLanguage .NET Editor searches for functions only inside PowerLanguage.Function namespace.
If a function is declared in a different namespace - PowerLanguage .NET Editor does not treat it as a function, but as a class.
The Red or Green indication next to a study in the PowerLanguage .NET Editor is not only compiled/cont compiled status, but also ready/not ready and verified as its type or not. So the study can be compiled and ready, but not treated as its type (a function) by PowerLanguage .NET Editor. In this case it will work ok, but will have a red indication next to it in the editor.