multicharts data series question

Questions about MultiCharts and user contributed studies.
seung1980
Posts: 9
Joined: 15 Jan 2010
Has thanked: 2 times

multicharts data series question

Postby seung1980 » 10 Mar 2010

Hi guys,

I got stuck on data series configuration so plz help.

I am trying to create a day trading program and there are 3 charts in it.

1st chart : 10 min bar of the instrument
2nd chart : 1400 min bar of the same instrument
3rd chart : function A based on 2ND CHART

Basically I want my program get activated on 1st chart when the value of 3rd chart meets a certain value. However it seems function chart cannot be defined as data series in Format Instrument - Settings - Display.

I can get the 2nd chart value by using keyword "data2" in powerlanguage but how can I get the value of 3rd chart in powerlanguage

User avatar
Bruce DeVault
Posts: 438
Joined: 19 Jan 2010
Location: Washington DC
Been thanked: 2 times
Contact:

Postby Bruce DeVault » 10 Mar 2010

You cannot. You would need to call the same functions the indicator in the third chart does to get the resulting values.

janus
Posts: 835
Joined: 25 May 2009
Has thanked: 63 times
Been thanked: 104 times

Postby janus » 10 Mar 2010

You cannot. You would need to call the same functions the indicator in the third chart does to get the resulting values.
I'm sure this has been suggested before. We need database querying functions in MC and one can define the secondary symbols in the main symbol properties box. Meanwhile, a workaround is to use global variables to communicate between the two studies, with the secondary study receiving data requests that are passed back and then picked up by the primary study on the next tick or bar update. The problem is the order of execution of the studies. I haven't tested this approach. One may have to allow for one extra tick or bar of delay. This brings up another idea. I wish I could override the order of execution of all studies not only within a workspace but right across all work spaces. This would help to avoid some inconsistencies when running MC on multi-core PCs.

bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Postby bowlesj3 » 10 Mar 2010

As far as I can see, studies are executed in alpha order within a chart but the order charts are excuted within a workspace is random (I guess it is the multi-threading). It would be interesting to retest this after the missing ticks problem is fixed. If would be interesting to see if the same missing tick is missed by all studies within the one chart or if that is random.
Last edited by bowlesj3 on 10 Mar 2010, edited 2 times in total.

User avatar
Bruce DeVault
Posts: 438
Joined: 19 Jan 2010
Location: Washington DC
Been thanked: 2 times
Contact:

Postby Bruce DeVault » 10 Mar 2010

Or you could consider using ADE or a similar approach using ELC shared lists/maps, as a workaround in the mean time.


Return to “MultiCharts”