Unexpected behavior of set target

Forums ProRealTime English forum ProOrder support Unexpected behavior of set target

Last updated 2 months, 1 week ago by avatar Despair.

3 post(s)
  • #43093

    I just noticed an unexpected behavior of the set target function.

    I was writing a strategy with cumulateorders=true. The strategy bought a contract and afterwards set a target with set target pprofit 100. After the position was 20 points in profit another contract was bought, no change to the target. Then came the surprise, the positions were (at least in backtest) sold not at once like i expected (i expected that both contracts would be sold 100 points above the cumulated positionprice) but one contract at a time, each after 100 points profit. So this means PRT was actually closing the position only partially. I thought this was impossible.

    #43096
    avatarAVT

    Well, you are the expert here, but with cumulateorders I think each orders values are calculated on basis of the price where it is activated, so the second order would also have pprofit 100 which is then higher as the one of the first order and for closing also later. And I am not sure whether a cumulated order is viewed as one single position or as a set of several positions within the whole strategy. Just my 2c.

    #43099

    Well obviously it is so that PRT assigns different TP to the different contracts. I thought this is a little bit surprising since it is otherwise impossible to close a position partially.

3 post(s)

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