Having trouble with a part of my money mangement logic in **Amibroker**, which I am not able to solve.
?
My money management is based on the following principle:
?
1. Invest only 2% of total Equity per Trade
2. Invest only 6% of total Equity on all open Trades
3. Currently my Stops/Risk is at 5%
?
Problem with my current formula is that my PositionSize is based on total Equity. It should be based on my Total Risk.
?
Free Risk = Total Risk (6% of Total Equity) - Risk of open Positions (5% of the Buy/ Sell Price times No.. of Shares)
?
Can you help me with that piece of programming logic, which than also enters trades and takes the remaining free risk and allocates it to a trade?