Why in 2018 still so difficult to access values from other DataN/indicators

Questions about MultiCharts and user contributed studies.
ecarlino
Posts: 17
Joined: 02 Feb 2012
Has thanked: 3 times
Been thanked: 1 time

Why in 2018 still so difficult to access values from other DataN/indicators

Postby ecarlino » 13 Jul 2018

Yes there are DLLs and 3rd party workarounds, but come on already - or am I missing something?

Why can't I write an indicator wherein I do NOT have to specify in advance which DataN it's working on,
then, apply it to several Data series on the same chart,
then, from a STRATEGY be able to read any of it's variables or plot values?

Using simple notation such as:

local.DataN.IndicatorName.VariableName
or
local.DataN.IndicatorName.PlotN

where "local" is specifying on the same chart
DataN is the data series
Indicator name and Variable name or PlotN from that indicator

I suppose the only additional complication would be if the same indicator was applied to the same DataSeries (but with different parameters),
but a simple Index scheme could be utilized.


Am I missing something - i.e. some new functionality released recently that does make it just this simple?
(the MC team does seem to be working quite hard on new releases, so my compliments and overall I am a long time, very satisfied user, but this seems to be the major gaping hole right now and has been since Day 1)

User avatar
Henry MultiСharts
Posts: 9134
Joined: 25 Aug 2011
Has thanked: 1260 times
Been thanked: 2929 times

Re: Why in 2018 still so difficult to access values from other DataN/indicators

Postby Henry MultiСharts » 13 Jul 2018

Hello ecarlino,

There is the "Study on study" feature:
https://www.multicharts.com/trading-sof ... y_on_study
You can also define an indicator in your code as an input, using the format described in the wiki section.

ecarlino
Posts: 17
Joined: 02 Feb 2012
Has thanked: 3 times
Been thanked: 1 time

Re: Why in 2018 still so difficult to access values from other DataN/indicators

Postby ecarlino » 13 Jul 2018

Hi Henry, thanks for your reply (and ALL of you help over the years!)
i had seen those, but it'd be so much cleaner to just be able to reference things in code - i'll take another look at these however, thanks again!

Xyzzy
Posts: 162
Joined: 19 Mar 2011
Has thanked: 43 times
Been thanked: 79 times

Re: Why in 2018 still so difficult to access values from other DataN/indicators

Postby Xyzzy » 13 Jul 2018

Note also that you can also specify functions as your price series in indicators. For example, say you want to plot the moving averages of Data1, Data2 and Data3. You can use the "Custom 3 Lines" indicator with these three inputs:

Average(Close, 100) of Data1
Average(Close, 100) of Data2
Average(Close, 100) of Data3

User avatar
TJ
Posts: 7235
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 991 times
Been thanked: 2058 times

Re: Why in 2018 still so difficult to access values from other DataN/indicators

Postby TJ » 16 Jul 2018

Look up the following keywords:

i_getplotvalue
i_setplotvalue

ecarlino
Posts: 17
Joined: 02 Feb 2012
Has thanked: 3 times
Been thanked: 1 time

Re: Why in 2018 still so difficult to access values from other DataN/indicators

Postby ecarlino » 16 Jul 2018

thanks, there are certainly ways to 'get around' things now. i currently use a combo of these methods. i have some indicators/functions that are several hundred lines of code each and measure things (vol, swings, time, price, etc) and there are several values from each and it would just make things a bit more elegant if i could use the notation i was describing in the OP.

it'd be nice if there was "native" global variable support - whether it was scoped to within a chart or workspace or truly global (ideally, be able to specify).

Xyzzy
Posts: 162
Joined: 19 Mar 2011
Has thanked: 43 times
Been thanked: 79 times

Re: Why in 2018 still so difficult to access values from other DataN/indicators

Postby Xyzzy » 16 Jul 2018

I agree with you that MultiCharts should have better built-in support for global variables. I made this request *seven years ago* as a feature request. Feel free to vote for it if you agree with it.

(MultiCharts people, this request has 50 votes! I love you, but you're killing me with the fact that this has been "under review" since 2011. This really can't be that difficult to implement. If nothing else, you could just add some syntactic sugar that makes these appear to be "regular" variables in EasyLanguage, but then delegate to GlobalVariables.dll for the implementation of get/set operations.)

For ecarlino, I would just suggest for now that you place all of your custom logic inside of functions (not indicators or signals). E.g., if you have a function FooBar(a, b, c), then you can plot that function using the built-in Custom 1 Line/2 Line/3 Line indicators by add the function call as an input. (As I describe above.) Likewise, you can call the function within your signal with a line of code. This eliminates the need to duplicate your logic.

dvdkite
Posts: 33
Joined: 16 May 2018
Has thanked: 5 times

Re: Why in 2018 still so difficult to access values from other DataN/indicators

Postby dvdkite » 18 Dec 2018

Hi everyone,

I need to communicate between 2 indicator in 2 different charts in the same workspaces.... 1 indicator is applied over a 1 contract bar chart and the other indicator in the other chart is on a 150 contract bar chart.

For testing purposes I tried to put

i_setplotvalue(111, 333); // in the giver indicator and

print( "plot value is: ", i_getplotvalue(111)); // into the receiver chart

Nothing happen, no print. (I'm using MultiCharts64 Version 11.0 Release (Build 15647)).

Am I doing something wrong??

I also surfed the web to find how to use global variables.... and I found an example about the here viewtopic.php?f=5&t=9870 and , if I'm correct the dll in version 11 should be already included into MC but if I try to type :

GVSetDouble

it simply doesn't recognize the keyword.

So Am I missing somthing? Any suggestions? Thanks

hughesfleming
Posts: 238
Joined: 22 Apr 2014
Has thanked: 58 times
Been thanked: 61 times

Re: Why in 2018 still so difficult to access values from other DataN/indicators

Postby hughesfleming » 19 Dec 2018

@Dvdkite, try to get up to speed with sharedvar server. I am finding it extremely useful to solve lots of different problems. While it was designed to share data with other trading applications, it can do much more than that.

For example, I am using it as bridge to Python as well as live dashboards for Portfolio trader. You can also use it for debugging etc. It would be great if Multicharts had something similar but until then, this does the job better than all the other solutions.

dvdkite
Posts: 33
Joined: 16 May 2018
Has thanked: 5 times

Re: Why in 2018 still so difficult to access values from other DataN/indicators

Postby dvdkite » 19 Dec 2018

@hughesfleming Thank you VERY MUCH for this suggestion!
Of course I prefer to solve problems directly inside the Multicharts environments but this seems to be very interesting to exchange datas not even between charts but also between different applications. I will check it for sure!

I would appreciate also an official answer from Multicharts, thanks :-D

User avatar
ABC
Posts: 636
Joined: 16 Dec 2006
Has thanked: 120 times
Been thanked: 359 times
Contact:

Re: Why in 2018 still so difficult to access values from other DataN/indicators

Postby ABC » 19 Dec 2018

dvdkite,

according to Note 1 in the wiki (https://www.multicharts.com/trading-sof ... tplotvalue) " i_setplotvalue can be used in signals, functions and indicators if any signal is applied to the main chart."
Check if it works if you apply any of the default signals to your chart.

For sending values across charts you will have to use a different approach, though and I would suggest looking into Global Variables or EasyLanguage collections.

Regards,

ABC


Return to “MultiCharts”