Out Params for a Function

Questions about MultiCharts .NET and user contributed studies.
ivanyu
Posts: 31
Joined: 24 Jul 2013
Has thanked: 3 times
Been thanked: 1 time

Out Params for a Function

Postby ivanyu » 29 Aug 2013

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!

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

Re: Out Params for a Function

Postby Henry MultiСharts » 30 Aug 2013

Can you do out params for a MultiCharts.Net function? I mean like ByRef parameters in EasyLanguage?
Hello ivanyu,

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).

ivanyu
Posts: 31
Joined: 24 Jul 2013
Has thanked: 3 times
Been thanked: 1 time

Re: Out Params for a Function

Postby ivanyu » 30 Aug 2013

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!!!

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

Re: Out Params for a Function

Postby Henry MultiСharts » 22 Oct 2013

Thank you for your feedback. We will do our best to make using classes in C# as easy and straight forward as possible.
public IVar<Double> operiodopen { get; set; }
Then openiodopen will be a pass by reference param?
That is correct. You can also have a look at the prebuilt DMI indicator that uses the DirMovement function.

tradetree
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

Postby tradetree » 12 Nov 2013

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!!!

ivanyu
Posts: 31
Joined: 24 Jul 2013
Has thanked: 3 times
Been thanked: 1 time

Re: Out Params for a Function

Postby ivanyu » 12 Nov 2013

MultiСharts team,

Carry on and release a better, simpler C# API please! Otherwise, it is difficult to compete with others that also offers C# API.

Thanks.

MaRCHeW
Posts: 37
Joined: 16 Nov 2013
Has thanked: 21 times
Been thanked: 8 times

Re: Out Params for a Function

Postby MaRCHeW » 03 Jan 2014

Hi :)
Thank you for your feedback. We will do our best to make using classes in C# as easy and straight forward as possible.
public IVar<Double> operiodopen { get; set; }
Then openiodopen will be a pass by reference param?
That is correct. You can also have a look at the prebuilt DMI indicator that uses the DirMovement function.
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

And where I can find description to DirMovement type. I don't see it in the PowerLanguage.NET help.

Regards
MaRCHeW

MaRCHeW
Posts: 37
Joined: 16 Nov 2013
Has thanked: 21 times
Been thanked: 8 times

Re: Out Params for a Function

Postby MaRCHeW » 06 Jan 2014

Hi :)
And where I can find description to DirMovement type. I don't see it in the PowerLanguage.NET help.
Ok, I found it http://lionsfutures.com/easylanguage_tu ... ds_Ref.pdf

Regards
MaRCHeW

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

Re: Out Params for a Function

Postby Henry MultiСharts » 06 Jan 2014

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
Hello MaRCHeW,

Please see #14 of MultiCharts .NET FAQ and Variables in 4.5_Functions_and_Special_Variables of the programming guide.


Return to “MultiCharts .NET”