[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] positionsize issue



PureBytes Links

Trading Reference Links

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										




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/