Specifying Time Series for Indicator

Questions about MultiCharts .NET and user contributed studies.
davewolfs
Posts: 89
Joined: 06 Feb 2013
Has thanked: 2 times
Been thanked: 11 times

Specifying Time Series for Indicator

Postby davewolfs » 09 Feb 2015

Support,

What is the proper approach to define which time series to use for an indicator. Note I am using Portfolio Trader so there is no bar magnification.

Here is what I mean by this.

I want the indicator to be populated with daily values, but I want to execute on close (eg. order begins execution 3:59PM EST). Therefore my primary series must be below the daily level e.g. Minute.

My signal generation is happening at a higher level e.g. daily. What is the simplest approach to populating an indicator with daily values but triggering on a smaller timeframe.

Aside from handling data myself via the loader and using my own indicator library would the proper way to handle this to be to use a Function instead of an indicator and specify the bar stream to be the desired stream e.g. the daily level stream. The only problem with this is that it will not have the most recent Daily Value (even if it is not complete) as part of its calculation.

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

Re: Specifying Time Series for Indicator

Postby Henry MultiСharts » 10 Feb 2015

Hello davewolfs,

There are no indicators in Portfolio Trader. Orders are generated by signals. Multiple signals form a single strategy.
Your trading series is always the main data series (data1). You can add up to 9 additional data series with XXX instrument and XXX resolution to your Portfolio Trader. In the script the subcharts’ data (DataN) can be accessed from the code and the calculation can be based on the subcharts’ (data seriesN) data:

Code: Select all

BarsOfData(2).Close
In Poftfolio Trader additional data series are represented as instruments in the vertical Data columns.

When using multiple data series please make sure the Realtime-History Matching is configured correctly.

davewolfs
Posts: 89
Joined: 06 Feb 2013
Has thanked: 2 times
Been thanked: 11 times

Re: Specifying Time Series for Indicator

Postby davewolfs » 10 Feb 2015

Does MC have a means to specify apply indicator X on data stream 2? The only way appears to be through the use of functions e.g

Rsi = new Function.RSI(this, 0);
Rsi.price = BarsOfData(2).Bars.Close;

Please confirm otherwise.

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

Re: Specifying Time Series for Indicator

Postby Henry MultiСharts » 11 Feb 2015

If you want the function to be calculated on additional data series / the variable to fix its values on additional data series - you need to specify the DataStream in the constructor:

Code: Select all

ADX _a = new ADX(this,2);
double _aa = PublicFunctions.TrueRange(this, 10, 2);
m_myrsi = new VariableSeries<Double>(this, 0, 2);


Return to “MultiCharts .NET”