(ADX)AddIndicator("ADX") Can you specify which datastream ?

Questions about MultiCharts .NET and user contributed studies.
Emmanuel
Posts: 303
Joined: 21 May 2009
Has thanked: 83 times
Been thanked: 22 times

(ADX)AddIndicator("ADX") Can you specify which datastream ?

Postby Emmanuel » 20 Feb 2015

Hi

When you call :

m_adx_indic = (ADX)AddIndicator("ADX") (see example below)

Can you specify which datastream you are using ? (BarsOfData(1...N).Close).


At the creation of an object, in "protected override void Create() ",

you need to give the datastream to the function :

m_adx1 = new Function.ADX(this, 2 );

how do you give the datastream with (ADX)AddIndicator("ADX") ?
or any other indicator ?


(Mov_Avg_1_Line)AddIndicator("Mov_Avg_1_Line") etc..


Thank you




Code: Select all

namespace PowerLanguage.Indicator{
public class a1 : IndicatorObject {
public a1(object _ctx):base(_ctx){}
private IPlotObject plot1;
private ADX m_adx_indic;
protected override void Create() {
plot1 = AddPlot();
m_adx_indic = (ADX)AddIndicator("ADX");
m_adx_indic.length = 20;
}

protected override void CalcBar(){
plot1.Set(m_adx_indic.Plots[0].Values[0]);
}
}
}

User avatar
Henry MultiСharts
Posts: 9093
Joined: 25 Aug 2011
Has thanked: 1258 times
Been thanked: 2923 times

Re: (ADX)AddIndicator("ADX") Can you specify which datastrea

Postby Henry MultiСharts » 20 Feb 2015

Hello Emmanuel,

At the moment there is no way to do that. Such AddIndicator interface extension for subchart indicator calculation is targeted to MultiCharts 9.1 beta1.

Emmanuel
Posts: 303
Joined: 21 May 2009
Has thanked: 83 times
Been thanked: 22 times

Re: (ADX)AddIndicator("ADX") Can you specify which datastrea

Postby Emmanuel » 20 Feb 2015

Hi Henry

Most of the function need the datastream when you create the object (after most of the function don't work properly when you change the datastream in startcalc())


In "protected override void Create(), "to select the datastream in (ADX)AddIndicator("ADX") you need to have a datatream available and to know which datastream is available.

For MC.NET 9.0, you have access to the datastream only in StartCalc sub with BarsOfData(1...N) and not in protected override void Create()

In protected override void Create(), BarsOfData(1...N) is not working, and in StartCalc you can not create object.


We have only two solution :

1/ To have access to the datastream of the chart in protected override void Create(), with BarsOfData(1...N) (as in startcalc() ) (with the Open, close,High, Low, info.Name, info.exchange, info.datafeed etc.)

2/ or to be able to create object in startcalc()

Henry, in beta 1, when AddIndicator will work with Datastream, would it possible to have access to the Datastream in protected override void Create(). (with the Open, close,High, Low, info.Name, info.exchange, info.datafeed etc.)


Thank you very much for your answer

Emmanuel
Posts: 303
Joined: 21 May 2009
Has thanked: 83 times
Been thanked: 22 times

Re: (ADX)AddIndicator("ADX") Can you specify which datastrea

Postby Emmanuel » 20 Feb 2015

Hi Henry

Do you know when MultiCharts 9.1 beta1 could be release approximately ?

Kind Regards

Emmanuel

User avatar
Henry MultiСharts
Posts: 9093
Joined: 25 Aug 2011
Has thanked: 1258 times
Been thanked: 2923 times

Re: (ADX)AddIndicator("ADX") Can you specify which datastrea

Postby Henry MultiСharts » 26 Feb 2015

Henry, in beta 1, when AddIndicator will work with Datastream, would it possible to have access to the Datastream in protected override void Create(). (with the Open, close,High, Low, info.Name, info.exchange, info.datafeed etc.)
Hello Emmanuel,

We cannot share any technical details regarding this functionality as we are still working on the technical specifications for it, so it can be different in the final product. We will keep you updated on the progress we have.

There is no ETA for MultiCharts 9.1 at the moment.

Emmanuel
Posts: 303
Joined: 21 May 2009
Has thanked: 83 times
Been thanked: 22 times

Re: (ADX)AddIndicator("ADX") Can you specify which datastrea

Postby Emmanuel » 06 Mar 2015

It is good news, it will be solve with Beta 1

Thank you very much for your answer Henry !!!!

User avatar
orad
Posts: 119
Joined: 14 Nov 2012
Has thanked: 50 times
Been thanked: 18 times

Re: (ADX)AddIndicator("ADX") Can you specify which datastrea

Postby orad » 18 Nov 2015

Hi, how is AddIndicator different from SetPlotValue/GetPlotValue? Can you please point me to some docs on them in the wikis if there is any? Thanks!

User avatar
Henry MultiСharts
Posts: 9093
Joined: 25 Aug 2011
Has thanked: 1258 times
Been thanked: 2923 times

Re: (ADX)AddIndicator("ADX") Can you specify which datastrea

Postby Henry MultiСharts » 20 Nov 2015

Hi, how is AddIndicator different from SetPlotValue/GetPlotValue? Can you please point me to some docs on them in the wikis if there is any? Thanks!
Hello orad,

AddIndicator - allows your code to create an instance of an indicator with certain inputs and access the output values of this indicator programmatically, without physically applying this indicator to a chart.
SetPlotValue, GetPlotValue - allows sending information from an existing on chart instance of a signal or indicator to the receiving indicator applied to the same chart. Helps to avoid excessive programming and eliminate discrepancies between indicator and signal.


Return to “MultiCharts .NET”