Unexpected behavior of set target

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43093 quote
    Despair
    Blocked
    Master

    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 quote
    AVT
    Participant
    Senior

    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 quote
    Despair
    Blocked
    Master

    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.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Unexpected behavior of set target


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Despair @despair Blocked
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Despair
8 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/12/2017
Status: Active
Attachments: No files
Logo Logo
Loading...