Hi All,
I am new to the platform and new to these boards. I was wondering if any one can help me? I have programmed a money management system but I am having to fix in the amount in the variable to say 1000. e.g. Capital = 1000. Is there a way of linking the Capityal variable to the account balance so that it not limited to 1000.
Cheers
No, you have to change the code whenever you add/withdraw money from your account.
If you mean adjusting your Capital with profits/losses, then you simply have to add STRATEGYPROFIT (the total profit/loss incurred whenever a trade closes) to your CAPITAL, which is fixed. Their sum is your Equity that you can use to manage your risk and position size.
Thanks you very much for your response.
Capital = 1000
Risk = 0.04
PV = Max(PointValue,0.000000001)
PS = Max(Pipsize,0.000000001)
equity = Capital + StrategyProfit
maxrisk = round(equity*Risk)
this is my code, my be a bit basic however I dont want the hard coded 1000K I want that to equaly the new balance after the trade ever made a loss or profit for example.
Trade 1 = 1000 Capotal
Trade 1 loses 50 therefore capital is 950
I am therefore trying to make my new capital amoutn equal to 950 without having to manually change the code.
Cheers again
Sorry to simplifiy it i mean across all my strategys so i need the amount in the account.
Cheers
JSParticipant
Senior
Strategy’s can’t communicate with each other and there is no link to your account possible.
“Equity = Capital + StrategyProfit” is correct and when you make a profit (StrategyProfit) then this amount will be added to your Capital (subtracted when it is a loss) but only for that strategy.
JSParticipant
Senior
Edit: “will be added to your Equity” (your Capital is fixed)