Cumsum long/short positions

Forums ProRealTime English forum ProOrder support Cumsum long/short positions

Viewing 2 posts - 1 through 2 (of 2 total)
  • #136262

    Hi there,

    I need my system to know how long/short I am in the market even though I, personnally, can’t/ could not possibly know…

    Below piece of code assumes that I have been building up on positions..

    Is this going to work? :

    Thanks for your replies

    #136263

    You don’t need to do any math.

    CountOfLongShares and CountOfShortShares return the data you need. Since you cannot have Long and Short trades opened at the same time, that’s all you need.

    CountOfPosition returns the same data, but as a positive number for Long trades and negative numbers for Short trades (you may use ABS() to work this around).

    They return data relative to the current strategy, since knowing what other strategies do is not currently supported.

     

    1 user thanked author for this post.
Viewing 2 posts - 1 through 2 (of 2 total)

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