2 strategies in chart, how can I pass info between them  [SOLVED]

Questions about MultiCharts and user contributed studies.
justme
Posts: 56
Joined: 08 Jan 2015
Has thanked: 9 times
Been thanked: 3 times

2 strategies in chart, how can I pass info between them  [SOLVED]

Postby justme » 15 Apr 2015

Hi, I have a multi data chart, 5 min as data1 and daily as data2. I need two strategies in the chart, where strategy #2 will know the MarketPosition of Strat#1. How is this done, so it will work both historically and in realtime?

Thanks.
Gordon

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: 2 strategies in chart, how can I pass info between them

Postby TJ » 15 Apr 2015

Hi, I have a multi data chart, 5 min as data1 and daily as data2. I need two strategies in the chart, where strategy #2 will know the MarketPosition of Strat#1. How is this done, so it will work both historically and in realtime?

Thanks.
Gordon
viewtopic.php?f=1&t=48312

justme
Posts: 56
Joined: 08 Jan 2015
Has thanked: 9 times
Been thanked: 3 times

Re: 2 strategies in chart, how can I pass info between them

Postby justme » 15 Apr 2015

global variables it is...

Thanks again TJ.

evdl
Posts: 401
Joined: 19 Jan 2011
Location: Netherlands
Has thanked: 85 times
Been thanked: 124 times

Re: 2 strategies in chart, how can I pass info between them

Postby evdl » 15 Apr 2015

Justme, global variabels can not be used historical only realtime. Just to let you know, so you can save yourself some time coding. Use ADE/ EL collections instead for both historical and realtime.

http://www.multicharts.com/discussion/v ... =1&t=47784

justme
Posts: 56
Joined: 08 Jan 2015
Has thanked: 9 times
Been thanked: 3 times

Re: 2 strategies in chart, how can I pass info between them

Postby justme » 15 Apr 2015

Thank you evdi.

orion
Posts: 250
Joined: 01 Oct 2014
Has thanked: 65 times
Been thanked: 104 times

Re: 2 strategies in chart, how can I pass info between them

Postby orion » 15 Apr 2015

Justme, global variabels can not be used historical only realtime. Just to let you know, so you can save yourself some time coding.
Not true. GVs can be used for both historical and realtime. For historical, you have to use them without their PL wrappers.

evdl
Posts: 401
Joined: 19 Jan 2011
Location: Netherlands
Has thanked: 85 times
Been thanked: 124 times

Re: 2 strategies in chart, how can I pass info between them

Postby evdl » 16 Apr 2015

Hi Orion,

Yes, you are right that it is possible to use GV on historical data (without the PL wrappers) in certain situations, but you need to make sure you sync the sender and receiver. In the case of Justme it is the same chart with two strategies. So it is already synced.

ADE or EL collections have the syncing built in. And for most historical uses IMO, this is the easiest way.


Return to “MultiCharts”