PureBytes Links
Trading Reference Links
|
Can be done, but not a short answer.
Try "pre-trading" it with your own variables. Then you can "watch" and
see if both trades signal and either wait until they do or at least
require both sides to exist before allowing your trade (e.g. myBuy =
condition) to become true for the real Buy = statement. This may even
require loop code.
So,
Begin loop
{
your trading system bar by bar
myBuy = whatever
myShort = whatever
other tracking variables
}
Buy = myBuy AND myShort; //if both are True the BUY is True.
Sell = ?????
Short = myBuy AND myShort;
Cover =
Hope you get the idea.
--
Terry
-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of dirk schreiber
Sent: Friday, August 18, 2006 14:27
To: amibroker
Subject: [amibroker] backtester: forcing trade entry at next "possible"
bar
hello,
i am currently backtesting an intraday pair trading system and i have
run into this little problem:
when my system triggers a signal (BUY stockA and SHORT stockB) sometimes
one of the two stocks does not have a quote on the bar it is supposed to
enter (stock without heavy volume, 1-min bars) so only one of the two
actually enters the trade (which is of course a big no-no).
how do i tell my system to respect the set trade delay, but if there is
no quote enter on the next quote after the trigger has been pulled?
dirk
_____
Get your email and more, right on the
<http://us.rd.yahoo.com/evt=42973/*http://www.yahoo.com/preview> new
Yahoo.com
|