How to make my strategy trade a percentage of account equity instead of fixed co

Forums ProRealTime English forum ProOrder support How to make my strategy trade a percentage of account equity instead of fixed co

Viewing 3 posts - 1 through 3 (of 3 total)
  • #252652

    Hi everyone,

    I’m trying to adjust my strategy so that it trades a percentage of my account equity instead of using a fixed number of contracts.

    Ideally, I’d like the strategy to automatically calculate position size based on my current equity — for example, allocate 2% of the account equity per trade. That way, the position size scales up as the account grows, and decreases after losses.

    Has anyone implemented this before in ProBuilder code?
    I’d really appreciate an example or some guidance on how to calculate and set the position size dynamically.

    Thanks a lot in advance!
    /Osca

    #252653

    Hi Osca,

    It is not possible to obtain your portfolio amount by means of ProBuilder.
    It *is* of course possible to enter that amount yourself as a parameter to the program code. But you would need change the parameter in/to the code and  restart that strategy code  in ProOrder to let the latest value come through.

    In other words : what you functionally want is not possible.

    #252676

    What PeterSt said is correct.

    But, since when you start a strategy you for sure KNOW how much of your balance is assigned to that strategy, simply code that value in your code and add to it the STRATEGYPROFIT, then you have to calculate thge risk for the trade and divide the result by the price to determine the number of contracts:

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

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