Problem After Last Update

Questions about MultiCharts .NET and user contributed studies.
User avatar
master.aurora
Posts: 33
Joined: 21 Jan 2013
Location: Islamabad
Has thanked: 6 times
Been thanked: 3 times
Contact:

Problem After Last Update

Postby master.aurora » 22 Feb 2013

Hello,

I have a piece of code that was working previously. But after a recent update to MC .NET, there is a small problem. The following line

Code: Select all

private AvgTrueRange _averageTrueRange;
is giving a compilation error because AvgTrueRange has been made static it seems. Can someone please clarify this?

Thanks,
Umer

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

Re: Problem After Last Update

Postby Henry MultiСharts » 22 Feb 2013

AvgTrueRange has been made static
Hello Umer,

That is correct. Here is how you can use it now:

Code: Select all

double tr_C = PublicFunctions.TrueRangeCustom(Bars.High, Bars.Low, Bars.Close);

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

Re: Problem After Last Update

Postby Henry MultiСharts » 22 Feb 2013

Here are the functions used for TrueRange calculation since MultiCharts .Net 8.5 beta.
They are available through static class PublicFunctions.


Description:
The function returns TrueRange value for current bar of the base data stream.

Parameters:
_this:
public static double TrueRange( this IStudy _this );

Description:
The function returns TrueRange value for the base datastream.

Parameters:
_this:

barsback:
public static double TrueRange( this IStudy _this, int barsback );

Description:
The function returns TrueRangeCustom value for '_this' study data on data
stream and 'barsback' bars ago.

Parameters:
_this:
Study info.

barsback:
Number of bars ago.

datastream:
Data stream number.

Returns:
TrueRangeCustom value for '_this' study data on data stream and 'barsback'
bars ago.
public static double TrueRange( this IStudy _this, int barsback, int datastream );

Description:
The function returns TrueRangeCustom value for the current bar.

Parameters:
high:
Hight series values.

low:
Low series values.

close:
Close series values.

Returns:
TrueRangeCustom value for the current bar.
public static double TrueRangeCustom( this ISeries<double> high, ISeries<double> low, ISeries<double> close );

Description:
The function returns TrueRangeCustom value for the offset 'bars ago' from
current bar.

Parameters:
high:
High series values.

low:
Low series values.

close:
Close series values.

offset:
The numerical expression specifying the number of bars back.

Returns:
TrueRangeCustom value for the offset 'bars ago' from current bar.
public static double TrueRangeCustom( this ISeries<double> high, ISeries<double> low, ISeries<double> close, int offset );

Description:
The function returns TrueRange series value.

Parameters:
_this:
public static ISeries<double> TrueRangeSeries( this IStudy _this );

Description:
The function returns TrueRange series value.

Parameters:
_this:

bb:
public static ISeries<double> TrueRangeSeries( this IStudy _this, int bb );

User avatar
master.aurora
Posts: 33
Joined: 21 Jan 2013
Location: Islamabad
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Problem After Last Update

Postby master.aurora » 22 Feb 2013

Thank you for the detailed reply.

I will try these and get back if i have any issues.

Thanks.

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Problem After Last Update

Postby JoshM » 23 Feb 2013

Here are the functions used for TrueRange calculation since MultiCharts .Net 8.5 beta.
They are available through static class PublicFunctions.
Thanks Henry. Perhaps I've misread it, but I couldn't find code breaking changes in the changelog for MC .NET 8.5 beta 2. Can these changes in the future be added to the changelog? :)

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

Re: Problem After Last Update

Postby Henry MultiСharts » 25 Feb 2013

Thanks Henry. Perhaps I've misread it, but I couldn't find code breaking changes in the changelog for MC .NET 8.5 beta 2. Can these changes in the future be added to the changelog? :)
Hello Josh,

We do not plan any code breaking changes in the nearest future, but in case it happens, we'll have that added to the changelog next time.


Return to “MultiCharts .NET”