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

[amibroker] How to Implement this type of Position Sizing?



PureBytes Links

Trading Reference Links

I'd like to code a Position Sizing function that does the following:

Splits all available equity such that,
1) There is a minimum of M (e.g., 5) positions opened
2) No position is larger than D (e.g. $30,000) amount

I want no maximum # of positions.

Two examples:
A) $160,000 in equity, M = 5, D = $30,000, should be split such that 
I have,
-5 $30,000 positions
-1 $10,000 position

B) $100,000 in equity, M = 5, D = $30,000, should be split such that 
I have,
-5 $20,000 positions


Can this be done in AFL?
Thanks.


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.12/655 - Release Date: 1/28/2007 1:12 PM