read value from one indicator into another?  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
Ram
Posts: 90
Joined: 25 Nov 2014
Has thanked: 17 times
Been thanked: 5 times

read value from one indicator into another?

Postby Ram » 07 Dec 2014

Hi all,

Using VB.Net I'm trying to read a value from one indicator into my own indicator, for example, in the image below my indicator is the one in the on bottom and the Bollinger addon is the Sub One chart:

Image

How do i read (for ex.) the UpperBand value of the Bollinger band from my indicator CalcBar() event?

C# solutions will work as well :)

Thanks much in advance!
Best,
R.
Attachments
bollinger and macd.png
(230.15 KiB) Downloaded 1516 times

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

Re: read value from one indicator into another?

Postby JoshM » 07 Dec 2014

Don't have time for a full code example, but there's a code example from Henry here that does this. In short, you need to use the `AddIndicator()` method.

Ram
Posts: 90
Joined: 25 Nov 2014
Has thanked: 17 times
Been thanked: 5 times

Re: read value from one indicator into another?

Postby Ram » 07 Dec 2014

Thx JoshM, I missed that post in my search, I'll look into it!
Cheers,
R.

Ram
Posts: 90
Joined: 25 Nov 2014
Has thanked: 17 times
Been thanked: 5 times

Re: read value from one indicator into another?  [SOLVED]

Postby Ram » 07 Dec 2014

For anyone how may be interested on how to do it using VB.Net:

add an Import

Code: Select all

Imports PowerLanguage.Indicator
add a variable

Code: Select all

Private MyBollinger as PowerLanguage.Indicator.vb_Bollinger_Bands
in Sub Create() add

Code: Select all

MyBollinger = AddIndicator("vb_Bollinger_Bands")
and to get the high band value in Sub CalcBar()

Code: Select all

g_High_Upper_Band = MyBollinger.Plots(0).Values(0)

Cheers,
R.

Emmanuel
Posts: 355
Joined: 21 May 2009
Has thanked: 109 times
Been thanked: 28 times

Re: read value from one indicator into another?

Postby Emmanuel » 12 Feb 2015

Hi


Awesome !!! Thank you !!!!!


Return to “MultiCharts .NET”