Money Management Question

Questions about MultiCharts and user contributed studies.
o2cool
Posts: 9
Joined: 29 Nov 2022
Has thanked: 1 time
Been thanked: 1 time

Money Management Question

Postby o2cool » 27 Feb 2023

Hello,

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.
The strategy just bought 10 positions today at the close for around $8k each... I'm only going back 50 days when turning on automated trading, so the Portfolio_Equity should be near the $40k initial value plus or minus a small amount for whatever trades happened in the 50 days. Somehow, I got $80k worth of trades instead.

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,

ScottishSpeculator
Posts: 47
Joined: 03 Jan 2023
Been thanked: 3 times

Re: Money Management Question

Postby ScottishSpeculator » 01 Mar 2023

Hey pal. I think you need to start thinking about how you are determining your stop loss. Because you need to know this for position size. Ie how many stocks at my (entry-stop) would equal my risk %


Return to “MultiCharts”