Hello
If I want to calculate something on Data2 chart I just need to add Data2 at the end of my instruction.
For example
myvar=(close data1)/(close data2)
What I don't know is how to send an order to the underlying of data2, all my orders get executed on data1.
What do I have to do?
For example I have on miniRusell data1 and S&P500 on data2 on the same chart. I make some calculations with both and I'd like to buy 1 contract of S&P500.
cheers
Buy and Sell on data2 ?? [SOLVED]
-
- Posts: 742
- Joined: 09 Apr 2010
- Location: Texas
- Has thanked: 483 times
- Been thanked: 274 times
- Contact:
Re: Buy and Sell on data2 ??
Orders can ONLY be applied to data1, so you'd have to reverse data1 and data2, so the order is applied to data1.
Re: Buy and Sell on data2 ??
What I really need is to execute orders on data1 and data2 at once, in order to do some kind of pair trading.
-
- Posts: 742
- Joined: 09 Apr 2010
- Location: Texas
- Has thanked: 483 times
- Been thanked: 274 times
- Contact:
Re: Buy and Sell on data2 ??
Maybe you could set up 2 charts and use a global variable for them to communicate and generate the signals..
In any event, all signals must be applied only to data1.
In any event, all signals must be applied only to data1.
Re: Buy and Sell on data2 ?? [SOLVED]
Hello
Thanks.
The problem with global variables is that you need to use external dll and not standard easylanguage, and is not as portable.
Thanks.
The problem with global variables is that you need to use external dll and not standard easylanguage, and is not as portable.
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: Buy and Sell on data2 ??
Dear skan,
This cannot be done from one chart. You can try to write a symmetrical strategy - the same calculations with reversed data series.
miniRusell data1 and S&P500 on data2 - original data series (buy miniRussel)
S&P500 data1 and miniRusell on data2 - the same calculations(sell S&P)
This cannot be done from one chart. You can try to write a symmetrical strategy - the same calculations with reversed data series.
miniRusell data1 and S&P500 on data2 - original data series (buy miniRussel)
S&P500 data1 and miniRusell on data2 - the same calculations(sell S&P)
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times