PureBytes Links
Trading Reference Links
|
Ok, I figured out how to do it...
1. Write two duplicate strategies each having the same spread system logic.
2. Create two duplicate charts each with a data1 and a data2 except in the
second chart reverse which symbols go in data1 and data2.
3. Assign the first strategy to the first chart. The first strategy will buy
and sell leg 1 of the spread only.
4. Assign the second strategy to the second chart. The second strategy will
buy and sell leg 2 of the spread only.
5. Each strategy is aware of which leg it is trading. And because the data1
and data2 symbols are reversed in the second chart, data1 will have the
correct symbol for the correct leg of the strategy.
This should take care of placing automated spread trades. For backtesting it
would be a little more difficult. One could use the Performance for each one
and just add the resulting performances of both strategies to achieve the
overall spread performance. Or as mentioned, write the buys and sells to a
comma delimited file and import the file into Excel to do the calculation.
Mike.
-----Original Message-----
From: Gary Fritz [mailto:fritz@xxxxxxxx]
Sent: Wednesday, June 05, 2002 6:27 PM
To: Treasure@xxxxxxx
Cc: omega-list@xxxxxxxxxx
Subject: Re: Buy or Selling Data2 - How can do?
> Does anyone know how can I Buy Data1 and Sell Data2 like doing a
> intermarket spread?
You can't. TS only supports buys, sells, stops, etc on Data1.
You can construct a synthetic spread for backtesting purposes -- just
chart your two markets and write the spread OHLC to a file, then
chart that in data1. But you can't do that in realtime, unless you
want to try something fancy like charting Mkt1 and Mkt2 in one
window, calculating and writing out the spread to a file, and then
forcing a second chart to re-read and chart the file at the end of
each bar. Messy.
If you don't use stops, you could compute your buy/sell points by
calculating the spread value between data1 and data2, or data2/3, or
whatever. What you actually buy and sell in data1 is fairly
irrelevant. Then just follow the system's buy/sell signals when they
hit. But this won't work if you need to use stops on the spread.
Gary
|