How to Link Inputs of the Same Indicator on a Workspace?

Questions about MultiCharts .NET and user contributed studies.
Jobauma
Posts: 113
Joined: 16 Apr 2013
Has thanked: 25 times
Been thanked: 6 times

How to Link Inputs of the Same Indicator on a Workspace?

Postby Jobauma » 14 Dec 2018

Hi.

I am wondering how this can be achieved. If an input is changed from one indicator, how to trigger a recalculation ("ExecControl.Recalculate();") for all other indicators of the same ID on the same workspace.

I want the link to be automatic ( regardless of how many charts there are on the workspace ). How can the indicator find its own ID? ( Is the indicator going to do this from every chart it's loaded to multiplied with all the other charts minus one, or is the indicators going to find a main one? ) I'm trying to achieve that I can change inputs from any of the indicators ( regardless of which one ), and the rest will do the same. Another thing I'm wondering about is how a specific timeframe ( for example: 1M, 2M, 3M, 1H, 2H or 3H ) can be identified ( regardless of which chart it is; 1, 2, 3, etc. ) if it exists. :)

The issue is I want the ID to be about the instrument and timeframe ( if it exists ), rather than which chart it is numerically. :) Is this possible? Can there be a way to use "BarsOfData()" with this solution, or do I have to set the ID in some way manually? Any help will be really appreciated. :D

Is there a way to bring the value of any variable series ( for example of "double" or "int" ) out of the indicator on a timeframe to the same indicator with another timeframe? ( Without a function. )



I hope that it is possible, and that someone can give me some clues. :)



Best regards,
Johannes Hillestad Baumann

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: How to Link Inputs of the Same Indicator on a Workspace?

Postby Anna MultiCharts » 15 Jan 2019

Hello, Jobauma!

You can try using Singleton that will store the indicators IDs and event states. Your studies will call it when they are calculated:
http://csharpindepth.com/articles/gener ... leton.aspx
MultiCharts doesn’t assign IDs for indicators, so you’ll need to do that from the code. Such info as instrument name and resolution can be accessed from the code, so once retrieved you’ll be able to assign IDs for your indicators.

Jobauma
Posts: 113
Joined: 16 Apr 2013
Has thanked: 25 times
Been thanked: 6 times

Re: How to Link Inputs of the Same Indicator on a Workspace?

Postby Jobauma » 20 Jan 2019

Thank you. :)

It's somewhat above my programming skills, but I will look further into it, when the time comes. :)

Some examples would be really appreciated, but I will probably have to find out for myself.

Thanks. :)



Best regards,
Johannes Hillestad Baumann

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: How to Link Inputs of the Same Indicator on a Workspace?

Postby Anna MultiCharts » 28 Jan 2019

Jobauma,

Unfortunately we don’t have any ready-made examples for this, so I’m afraid you’ll need to search for this on the web or maybe other Forum users will be able to share their experience on this matter.


Return to “MultiCharts .NET”