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

[amibroker] BackTest Question



PureBytes Links

Trading Reference Links

Hi,

Wonder if this is possible and if there is an example of the AFL code.

Is it possible to set the number of open positions in backtest 
according to a total percentage risk amount as follows.

I have starting trading capital of $100,000. I only ever want to have 
a total dollars at risk of say 5% of that capital - however as my 
equity increases I also want to have a total at risk 5% of that 
increasing equity on each new trade.

I only want to risk say 0.5% of capital per trade where the number of 
shares to buy is  Risk Amount / (entry price - stop price) - BUT the 
number of trades is set such that the total at risk is 5% of total 
equity.

As each share increases in price the trailing stop rises, the at risk 
amount decreases for that trade and more positions can be entered. 
Also more positions can be entered if the trailing stop is hit on a 
particular trade and that trade is closed out.

Thanks,

Geoff





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/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/