I wrote a pair trading AFL as the following. but the positionsize only work in
Sell side. the Buy side not work. Why?
-----------------------------------
if( Name() == theFirst )
{
SetPositionSize( 10000, spsValue );
Buy = EntrySignal;
Sell = ExitSignal;
}
if( Name() == theSecond )
{
SetPositionSize( 10000, spsValue );
Short = EntrySignal;
Cover = ExitSignal;
}
------------------------------------
Ticker Trade Date Price Ex. date Shares Position value Scale
In/Out
DIG Long 3/8/2007 60.5063 3/19/2007 4 242.03 0/0
NEM Short 3/8/2007 42.3988 3/19/2007 235.856 10000 0/0
DIG Long 3/23/2007 66.175 4/20/2007 8.3 549.25 0/0
NEM Short 3/23/2007 42.8846 4/20/2007 233.184 10000 0/0