Variable Equal to platform balance

Forums ProRealTime English forum General trading discussions Variable Equal to platform balance

Viewing 7 posts - 1 through 7 (of 7 total)
  • #184591

    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

    #184595

    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.

     

    #184597

    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

    #184602

    Sorry to simplifiy it i mean across all my strategys so i need the amount in the account.

     

    Cheers

    #184613
    JS

    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.

    #184615
    JS

    Edit: “will be added to your Equity” (your Capital is fixed)

    #184616

    Great thanks you

Viewing 7 posts - 1 through 7 (of 7 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login