BollingerBand - fractional standard deviations  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
EdL
Posts: 39
Joined: 18 Feb 2013
Has thanked: 22 times
Been thanked: 11 times

BollingerBand - fractional standard deviations

Postby EdL » 26 Feb 2013

Hi,

I am working on a signal that uses PowerLanguage.Function.BollingerBand.
The BollingerBand.numdevs property takes an integer but I require a double in order to set the Bollinger band up with a fractional standard deviation. e.g. Setting up a Bollinger band with a standard dev of 2.5

I think it's quite a basic requirement and was surprised that the function only takes ints. I have filed a feature request in the Project Management app

https://www.multicharts.com/pm/viewissu ... no=MC-1246

However, until this is reviewed, is there a way I can create a class and inherit from PowerLanguage.Function.BollingerBand and override this property (or add my own property) in order to implement a version that allows doubles?
Is the source for the PowerLanguage.Functions available as it is with the indicators?

Many thanks,

Ed

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

Re: BollingerBand - fractional standard deviations

Postby Henry MultiСharts » 27 Feb 2013

Hello Ed,

The source code of the functions is available since MultiCharts 8.5 beta. You can download it from this page.

The BollingerBand.numdevs property can take double values as well. Just change "int" to "double" in the code of the study:

Code: Select all

[Input]
public double numdevsup { get; set; }

EdL
Posts: 39
Joined: 18 Feb 2013
Has thanked: 22 times
Been thanked: 11 times

Re: BollingerBand - fractional standard deviations

Postby EdL » 27 Feb 2013

Thanks Henry. I have installed 8.5 beta and can now see the functions in the PowerLanguage.NET editor (but I can not see them in VS).

However, there is no longer a BollingerBand function! All the other ones are present, but BollingerBand appears to have been removed and its functionality replaced with:

Bars.Close.BollingerBandCustom(length, numDevs);

This has lead to a breaking change in my custom BB indicator and signal that I created using v8.0.
(Similarly the implementation of the RSI function has also had a breaking change)

Fortunately it does take a double now, so at least I can achieve the result I was after :-)

Is this how the Bollinger Band will work going forward, or is it going to be added back in as a PowerLanguage.Function?

and

Where are the Function C# files so we can view them in VS?

Many thanks,

Ed

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

Re: BollingerBand - fractional standard deviations  [SOLVED]

Postby Henry MultiСharts » 27 Feb 2013

Is this how the Bollinger Band will work going forward, or is it going to be added back in as a PowerLanguage.Function?
It is how the Bollinger Band will work going forward, but you can submit a request to have BollingerBand function added back.
Where are the Function C# files so we can view them in VS?
Functions are not in VS solution, they are built-in in PLEditor.
That means they cannot be seen in Visual Studio.

EdL
Posts: 39
Joined: 18 Feb 2013
Has thanked: 22 times
Been thanked: 11 times

Re: BollingerBand - fractional standard deviations

Postby EdL » 27 Feb 2013

Thanks Henry. I will just use the new way of creating a Bollinger Band. Just wanted to check it wasn't going to be suddenly changed back.


Return to “MultiCharts .NET”