Strategyprofit negative number

Forums ProRealTime English forum ProOrder support Strategyprofit negative number

Viewing 3 posts - 1 through 3 (of 3 total)
  • #117489
    J.

    Hello, can strategyprofit be negative?

    I’m trying to make my position sizing dynamic based on how much capital I have.

    I noticed in backtesting that my position sizing won’t go down after having a negative start.

    Is there a better way to do this?

    Thanks

    #117491
    J.

    Quick side note: I’m using this to open and close positions, could it be that I first have to give a Sell and Exitshort command for my dynamic sizing to work?

    Edit: tested it and it didn’t work either.

    #117494

    Strategyprofit is updated with positions closed. So you have to close positions in order to use strategyprofit to calculate your new position size.

    However you can also use this snippet to compute in real time the floating profit of the open orders at market:

     

    2 users thanked author for this post.
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