Treating indicators as data series

Questions about MultiCharts .NET and user contributed studies.
MidKnight
Posts: 343
Joined: 12 Aug 2012
Has thanked: 123 times
Been thanked: 56 times

Treating indicators as data series

Postby MidKnight » 29 Oct 2012

Hi there,

I have some code that is generic enough to be applied to a variety of data series (ie, volume, range, breadth) but I can't see how to make it so these different data series can be used with in my code? I can't see how to link my study to anything other than the instrument price data series. Please say this isn't the case!

If this is how it is in MC.net, then I won't be able to use the "Function" facility and instead will have to create it as a regular class. So far I haven't been able to make a single re-usable function with all my stuff showing up in my own custom classes and hierarchies.

Hopefully someone knows what to do here. This whole "Function" facility so far seems useless to me.

With kind regards,
MK

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

Re: Treating indicators as data series

Postby Henry MultiСharts » 29 Oct 2012

All chart types and resolutions are plotted out of 3 base data types that are provided by data vendor.
You can only reference the instrument price data series. The shape of the plotted data is determined by MultiCharts.

Please describe in details the exact difficulty you have. Attach examples of the code you are using. What particular results do expect to have?

MidKnight
Posts: 343
Joined: 12 Aug 2012
Has thanked: 123 times
Been thanked: 56 times

Re: Treating indicators as data series

Postby MidKnight » 29 Oct 2012

Hi Henry,

The idea is simple and many charting platforms treat it as I'll describe, if you want examples of these platforms I'll tell you but I don't mention it for now out of respect to MC.net. Lets use a simple example of a moving average. This is a generic enough calculation that you may want to apply this to more than just an instrument. The data source for the moving average calculation could be an instrument price series, or it could be volume, or bar range, or time for non-time based charts etc....One would normally be able to put the volume on your chart and then add the moving average onto the chart while setting its data source to be the volume indicator. No code required, just specify an indicator as the data source and its done. This keeps ones indicators/statistics quite modular and plug-gable with one another.

This is just like my code. There is no reason why it should only be able to calculate an instrument data series. But unless I can link it to other data sources, it would mean duplicating the code into a variety of other indicators. Does this make sense? I will share the code with the community when done, but I want to share it in a re-usable state rather than something only bound to an instrument data series.

With kind regards,
MK

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

Re: Treating indicators as data series

Postby Henry MultiСharts » 30 Oct 2012

That is not possible to apply an indicator to an indicator directly.

Here is the way you can achieve your goal:
You can do the calculation you need and assign the value to VariableSeries variable:
vs=indicator1(close)
Then from your target code you need to use VariableSeries variable as an input, for ex.:
vs2=indicator2(vs)
If you need to use the value of "indicator calculated on indicator2" in indicator3:
vs3=indicator3(vs2)

johnromeronc
Posts: 53
Joined: 18 Feb 2011
Has thanked: 11 times
Been thanked: 13 times

Re: Treating indicators as data series

Postby johnromeronc » 08 Nov 2012

I would agree having the ability to use values, other than the original data series allows for a much more flexible building of logic. There are many platforms out there that act as requested. I come from NeoTicker, which was that way.

Henry, I believe in your suggested method, all code would still have to be in one larger indicator, and I think they still would have to be functions instead of indicators.

Just my 2 cents.

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

Re: Treating indicators as data series

Postby Henry MultiСharts » 09 Nov 2012

I believe in your suggested method, all code would still have to be in one larger indicator
Yes that is correct.
and I think they still would have to be functions instead of indicators.
No, they can be indicators.

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

Re: Treating indicators as data series

Postby davewolfs » 14 Apr 2013

Did anything ever come of this? This is probably one MC.NET's largest flaws.

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

Re: Treating indicators as data series

Postby Henry MultiСharts » 15 Apr 2013

We are looking into improving this functionality in one of the next versions of MultiCharts.

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

Re: Treating indicators as data series

Postby davewolfs » 20 Apr 2013

We are looking into improving this functionality in one of the next versions of MultiCharts.
When? Can you give some details. Will we be able to do indicators on indicators?

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

Re: Treating indicators as data series

Postby Henry MultiСharts » 22 Apr 2013

We are looking into improving this functionality in one of the next versions of MultiCharts.
When? Can you give some details. Will we be able to do indicators on indicators?
We are going to provide access for the objects of one study from the second study in MultiCharts 9.0.
MultiCharts 9 is targeted to the second half of this year (roughly). There is no exact date for it yet.
We are also looking into providing ability to base an indicator on indicator through the UI in one of the future versions.


Return to “MultiCharts .NET”