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
bollinger and macd.png (230.15 KiB) Viewed 933 times

User avatar
JoshM
Posts: 2090
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1526 times
Been thanked: 1489 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.
These users thanked the author JoshM for the post (total 2):
RamEmmanuel

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.
These users thanked the author Ram for the post (total 2):
Henry MultiСhartsEmmanuel

Emmanuel
Posts: 293
Joined: 21 May 2009
Has thanked: 74 times
Been thanked: 20 times

Re: read value from one indicator into another?

Postby Emmanuel » 12 Feb 2015

Hi


Awesome !!! Thank you !!!!!


Return to “MultiCharts .NET”