Using True – cumulating positions

Forums ProRealTime English forum ProOrder support Using True – cumulating positions

Viewing 7 posts - 1 through 7 (of 7 total)
  • #97650

    When using True to activate cumulative positions, is there a simple way to limit the number of positions to a maximum?

    #97651

    COUNTOFPOSITION returns the number of open positions.

    COUNTOFLONGSHARES returns the number of open Long positions.

    COUNTOFSHORTSHARES returns the number of open Short positions.

    Example:

     

    #97661

    Don’t forget that COUNTOFPOSITION is a negative value if you are short on the market and a positive value if you are long. You can use:

    to return only a positive value. So Roberto’s code needs to be like the following to work with  short position quantities.

     

    1 user thanked author for this post.
    #97670

    This looks very good – many thanks Roberto and Vonasi!!

    #97671

    Copied to here

    Snippet Link Library

    Another successful collaboration on the Snippet Log! 🙂

    1 user thanked author for this post.
    #136055

    z = n*3/2

    And is n*3/2 allowed as a lot size for the Instrument you are trading?

    If it were me I would concentrate on making a profit by getting the strategy correct for Long entry / exit and Short entry / exit and use Lot size = 1 for simplicity?

    After you are making consistent profit every week for months … then tweak lot size etc??

    #136058

    Sorry @GraHal, I deleted all of his posts here because he had started another topic in the French forum.

    You may want to post your reply, in French, there https://www.prorealcode.com/topic/taille-de-position-en-fonction-de-lhoraire-de-trading/.

     

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

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