Can you do out params for a MultiCharts.Net function? I mean like ByRef parameters in EasyLanguage?
Other than the programming guide, is there other beginner tutorial on MultiCharts.Net?
Thank you very much!
Out Params for a Function
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Out Params for a Function
Hello ivanyu,Can you do out params for a MultiCharts.Net function? I mean like ByRef parameters in EasyLanguage?
That is possible to do that.
Our Wiki section provides detailed up-to-date information about current MultiCharts functionality.
As for the .Net programming guide - MultiCharts .Net is oriented to experienced programmers. In case you have any questions regarding C# coding we recommend referencing MSDN for information. Interfaces and classes available in MultiCharts .Net are described in MC .Net help file (PowerLanguage .Net Editor->Help tab-> PowerLanguage .Net Help). You can also find the code examples in the source code of the prebuilt MultiCharts studies (PowerLanguage .Net Editor->File tab->Open).
Re: Out Params for a Function
Thank you for the reply.
I am not an expert C# developer but an average one. I have to admit that the C# classes are somewhat more complicated than it needs to be, primarily because (I think) it needs to mimic Easy Language and attempts to provide a wrapper classes/interfaces on top of it, as opposed to a brand new clean set of classes. Quite a few things can be encapsulated to a larger extent, rather than passing the complexity over to the developer.
When I look at the other trading software C# API (not implying it is better), it is much simpler because it does not need to wrap and build on top of anything.
e.g. MC.NET does not seem to make use of operator overloading to make the syntax easier, but chose to use interface and templates extensively.
Back to my question on reference parameters on a function, do I need to do something like below?
public IVar<Double> operiodopen { get; set; }
Then openiodopen will be a pass by reference param?
Thanks again for your help!!!
I am not an expert C# developer but an average one. I have to admit that the C# classes are somewhat more complicated than it needs to be, primarily because (I think) it needs to mimic Easy Language and attempts to provide a wrapper classes/interfaces on top of it, as opposed to a brand new clean set of classes. Quite a few things can be encapsulated to a larger extent, rather than passing the complexity over to the developer.
When I look at the other trading software C# API (not implying it is better), it is much simpler because it does not need to wrap and build on top of anything.
e.g. MC.NET does not seem to make use of operator overloading to make the syntax easier, but chose to use interface and templates extensively.
Back to my question on reference parameters on a function, do I need to do something like below?
public IVar<Double> operiodopen { get; set; }
Then openiodopen will be a pass by reference param?
Thanks again for your help!!!
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Out Params for a Function
Thank you for your feedback. We will do our best to make using classes in C# as easy and straight forward as possible.
That is correct. You can also have a look at the prebuilt DMI indicator that uses the DirMovement function.public IVar<Double> operiodopen { get; set; }
Then openiodopen will be a pass by reference param?
-
- Posts: 81
- Joined: 29 Apr 2013
- Location: www.threefoldmarkets.com
- Has thanked: 12 times
- Been thanked: 16 times
- Contact:
Re: Out Params for a Function
This is a very good observation. I am an advanced C# programmer and I still find it hard to code MC.NET mainly because the interfaces are not described in reference to objects that are readily available in CalcBar. I think you are correct that trying to adhere to EasyLanguage history is what has made this so difficult. I posted elsewhere that with some more glue-documentation they could tie some of the interfaces to objects and it then is really not as hard.
Thank you for the reply.
I am not an expert C# developer but an average one. I have to admit that the C# classes are somewhat more complicated than it needs to be, primarily because (I think) it needs to mimic Easy Language and attempts to provide a wrapper classes/interfaces on top of it, as opposed to a brand new clean set of classes. Quite a few things can be encapsulated to a larger extent, rather than passing the complexity over to the developer.
When I look at the other trading software C# API (not implying it is better), it is much simpler because it does not need to wrap and build on top of anything.
e.g. MC.NET does not seem to make use of operator overloading to make the syntax easier, but chose to use interface and templates extensively.
Back to my question on reference parameters on a function, do I need to do something like below?
public IVar<Double> operiodopen { get; set; }
Then openiodopen will be a pass by reference param?
Thanks again for your help!!!
Re: Out Params for a Function
Hi
Similar example we have in: https://www.multicharts.com/trading-sof ... Commentary
And where I can find description to DirMovement type. I don't see it in the PowerLanguage.NET help.
Regards
MaRCHeW
Can somebody explain me why I have to use IVar<T> type instead of standard int or double typesThank you for your feedback. We will do our best to make using classes in C# as easy and straight forward as possible.
That is correct. You can also have a look at the prebuilt DMI indicator that uses the DirMovement function.public IVar<Double> operiodopen { get; set; }
Then openiodopen will be a pass by reference param?
Similar example we have in: https://www.multicharts.com/trading-sof ... Commentary
And where I can find description to DirMovement type. I don't see it in the PowerLanguage.NET help.
Regards
MaRCHeW
Re: Out Params for a Function
Hi
Regards
MaRCHeW
Ok, I found it http://lionsfutures.com/easylanguage_tu ... ds_Ref.pdfAnd where I can find description to DirMovement type. I don't see it in the PowerLanguage.NET help.
Regards
MaRCHeW
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Out Params for a Function
Hello MaRCHeW,Can somebody explain me why I have to use IVar<T> type instead of standard int or double types
Similar example we have in: https://www.multicharts.com/trading-sof ... Commentary
Please see #14 of MultiCharts .NET FAQ and Variables in 4.5_Functions_and_Special_Variables of the programming guide.