Possible "Method" Bug

Questions about MultiCharts .NET and user contributed studies.
Jobauma
Posts: 113
Joined: 16 Apr 2013
Has thanked: 25 times
Been thanked: 6 times

Possible "Method" Bug

Postby Jobauma » 08 Feb 2018

Hi.



I'm just going to give an example here. :)

Code: Select all

public void Method( bool HH )
{
if ( Bars.High[0] > Bars.High[1] ) HH = true;
else HH = false;
}
This doesn't make any change to HH, but this however works:

Code: Select all

public void Method( VariableSeries<bool> HH )
{
if ( Bars.High[0] > Bars.High[1] ) HH.Value = true;
else HH.Value = false;
}
Same applies to int counters. :)

Not a big problem though, but thought I could just mention it. :D

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: Possible "Method" Bug

Postby Svetlana MultiCharts » 14 Feb 2018

Hello, Jobauma,

You can use “out” contextual keyword for the first variant. Please find the reference here:
https://docs.microsoft.com/en-us/dotnet ... ywords/out

Jobauma
Posts: 113
Joined: 16 Apr 2013
Has thanked: 25 times
Been thanked: 6 times

Re: Possible "Method" Bug

Postby Jobauma » 26 Nov 2018

Thanks!

It worked. :)



Best regards,
Johannes Hillestad Baumann


Return to “MultiCharts .NET”