|
hello group,
i am trying to run a pair trading
strategy through AB's backtester and have run into some problems:
- how do i tell the backtester to
buy one ticker and sell another ticker at the same bar?
here is what i thought would be a
good idea: i use AddToComposite() to build an artificial pair ticker. C is
assigned with the pair ratio, H and L hold the values of the close of ticker1
and ticker2 respectively.
now if ratio does <formula>
Buy ticker1 and Sell ticker2, this obviously does not work as you cannot go long
and short at the same time. or is there a workaround?
referencing Foreign() or playing
around with Buyprice() did not work either, the backtester only takes the long
signals.
i would be grateful for some
ideas,
dirk
Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For other support material please check also: http://www.amibroker.com/support.html
SPONSORED LINKS
YAHOO! GROUPS LINKS
Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze. |
- [amibroker] BUY and SHORT at the same Bar? dirk schreiber
- Re: [amibroker] BUY and SHORT at the same Bar? dirk schreiber
