Different Strategies on one chart

Questions about MultiCharts and user contributed studies.
User avatar
siscop
Posts: 188
Joined: 09 Jan 2011
Has thanked: 33 times
Been thanked: 25 times

Different Strategies on one chart

Postby siscop » 01 Sep 2011

Hi,
just to make sure I understand it right.
I can put different Strategies on one chart and they all work together? So if one opens the others realize that the marketposition=1?
Example:
I have 4 different strategies…
2 for entries and 2 for exit.

Strategy1:

Code: Select all


If marketposition=0 and condition1 then
Enterlong next bar at market;

Strategy2:

Code: Select all


If marketposition=0 and condition1 then
Enterlong next bar at market;
Strategy3:

Code: Select all


If marketposition=1 and condition1 then
Sell  next bar at market;
Strategy4:

Code: Select all


If marketposition=1 and condition1 then
Sell next bar at market;

Q1: Since all 4 strategies are separate I can use the same variables (condition1) with no relationship with another. <- is this correct?
Q2: Can I do that? The Strategies 3 and 4 would catch the entries of strategie 1 and 2?
Q3: How can I transfer variables from one strategy to another? Do I have to go threw a file and temperary store the variable in there for the other strategie to get it or is there another way?

Yes I could just combine the 4 different in one but I have a reason for the seperation.

User avatar
Henry MultiСharts
Posts: 8476
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2718 times

Re: Different Strategies on one chart

Postby Henry MultiСharts » 01 Sep 2011

Hello, siscop.
1) All 4 strategies are separate and you can use the same variables (condition1) with no relationship to another. That is correct.
2) The signals will form one strategy. The strategies 3 and 4 would catch the entries of the strategies 1 and 2. That is also correct.
3) You can transfer variables from one strategy to another with the help of the Global Variables. Please see the attachment. You can find more information about using this dll over the Internet.
Attachments
GlobalVariable.zip
(61.42 KiB) Downloaded 43 times
These users thanked the author Henry MultiСharts for the post:
siscop

User avatar
siscop
Posts: 188
Joined: 09 Jan 2011
Has thanked: 33 times
Been thanked: 25 times

Re: Different Strategies on one chart

Postby siscop » 01 Sep 2011

Thank you Henry


Return to “MultiCharts”