Hello,

I am a beginner and looking for a way to calculate position sizing based on the available cash.

I have read some Posts with Topic "Position Sizing bases on Equity", likewise a post with the topic "position sizing based on available cash" which does not correspond to my question. What they write there is correct in this Posts, but only as long as I am not reducing an open position through ScaleOut.

Simple example:

InitialCapital = 100,000

MaxPos = 5

SPSPercentOfEquity = 100 / Maxpos

I start with 100,000 cash.

I am now opening 2 positions.

Then have 2 positions with 20,000 = 40,000 and 60,000 cash. Equity = 100,000

From the 2 open positions with a total of 40,000, I am reducing 20,000 through ScaleOut.

I then have 2 open positions with a total of 20,000 and 80,000 cash. Then equity = 100,000

Then I'll open three more positions. I reached MaxPos.

Equity = 100,000, 3 more positions = 3 X 20,000 = 60,000

I now have 5 open positions = 80,000 and 20,000 cash.

The cash position will increase more and more through scaleouts.

Maybe someone can give me a tip or a short CBT example of how I can program PositionSizing based on the amount of cash available. I searched the forum, help, and documentation and found nothing. A quick hint is enough.

Sorry for the stupid beginner question and thanks for a hint.