PureBytes Links
Trading Reference Links
|
That should work. I am doing essentially the same and it works for me.
I don't see where you are setting BuyPrices, but I don't think this
affects the results.
OC = ParamField("Trade price", field = 0 );
BuyPrice = SellPrice = ShortPrice = CoverPrice = OC
Also you are not setting this and maybe that is the problem:
SetOption("UsePrevBarEquityForPosSizing",False);
--
Terry
-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of q03237241
Sent: Sunday, April 30, 2006 03:02
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Position Size Settings
Hi,
This should be simple but I am obviously missing something...
I want to limit position size in a portfolio backtest and have the
following code:
//-------------------------------------
SetFormulaName("LastWeek"); //name in backtest report
SetBarsRequired(4000,1); //needed line
SetTradeDelays(1, 1, 1, 1); //open & close trades delay
SetOption( "initialequity", 100000 ); //initial capital
PositionSize = 10000; //trade size
RoundLotSize = 10;
SetOption( "MaxOpenPositions", 10 ); //max trades open
SetOption( "PriceBoundChecking", 1 ); //trade within days bar
//--------------------------------------
However when I run the backtest the AA results show trades entered
that exceed $10,000 in value.
What am I missing here?
regards
Chris
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
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
GFT Forex Trading Accounts As low as $250 with up to 400:1 Leverage. Free Demo.
http://us.click.yahoo.com/lpv1TA/jlQNAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
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
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> 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/
|