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
Treating indicators as data series
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Treating indicators as data series
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?
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?
Re: Treating indicators as data series
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
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
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Treating indicators as data series
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)
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)
-
- Posts: 53
- Joined: 18 Feb 2011
- Has thanked: 11 times
- Been thanked: 13 times
Re: Treating indicators as data series
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.
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.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Treating indicators as data series
Yes that is correct.I believe in your suggested method, all code would still have to be in one larger indicator
No, they can be indicators.and I think they still would have to be functions instead of indicators.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Treating indicators as data series
We are looking into improving this functionality in one of the next versions of MultiCharts.
Re: Treating indicators as data series
When? Can you give some details. Will we be able to do indicators on indicators?We are looking into improving this functionality in one of the next versions of MultiCharts.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Treating indicators as data series
We are going to provide access for the objects of one study from the second study in MultiCharts 9.0.When? Can you give some details. Will we be able to do indicators on indicators?We are looking into improving this functionality in one of the next versions of MultiCharts.
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.