I am a newbie at muilticharts. Trying to struggle my way through. Any thoughts/advice/info would certainly be appreciated!
I am testing out a system in portfolio trader. I set the Money Management Settings as follows:
Exposure: 100%
Max % of Capital Risk per Position: 25%
Initial Portfolio Capital: 40k
Margin Value: 100%
Max Potential Loss: 0%
In the strategy code, I am using some basic money management code. It divides the portfolio equity into 20% chunks, and then divides this amount by the share price to get the number of shares to buy:
Code: Select all
input: RiskPercentage(0.2);
variable: PositionSize(0), SharesToBuy(0);
PositionSize = Portfolio_Equity * RiskPercentage;
if PositionSize/Close <>0 then
SharesToBuy = PositionSize/Close;
// If conditions etc. then buy SharesToBuy next bar etc.
I was under the impression that the Money Management Settings would block this type of thing from happening? Maybe I am wrong? Just don't know.
Thanks for any help,