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