Code maximum number of positions

Forums ProRealTime English forum ProOrder support Code maximum number of positions

Viewing 6 posts - 1 through 6 (of 6 total)
  • #90445

    Hi – I’m getting there slowly and have just enabled the option in my code to allow multiple trades…

    DEFPARAM CumulateOrders = true

    Although I can limit the number of trading orders when I execute AutoTrading, this number (say 20x) may be lower than the number of trades opened in the back test – ie 60

    My question is can I enter a line in the code that limits the number of Cumulative trades to say 20x – and so the back test will only go to 20?

     

    Thanks

     

    #90482

    I can suggest these useful instructions for that purpose:

    COUNTOFPOSITION

    COUNTOFLONGSHARES

    COUNTOFSHORTSHARES

    #90525

    Many thanks Nicolas – your work that you have shared on this site is very good!

    I’ll try those instructions now, and let you know how I get on.

     

    1 user thanked author for this post.
    #90687

    Hi Nicolas

    I’m struggling to enable the counter.  Ideally I want to simply enter code – and be able to adjust the maximum number of contracts, for the purpose of backtesting.  For real auto trading I will use the controller option (Max) in the auto trading startup.

    If you could share a few lines of code that will enable me to do that?

    Also, I am looking for someone to help me with a project (privately).  If you are interested, please contact me (email address deleted by admin)

    Thanks

     

    #90694

    David Thompson – I have deleted your email address from your message as it is not advisable to post private information in a public forum.

    You can use this form to for paid programming services:

    https://www.prorealcode.com/trading-programming-services/

    or use the ‘Contact Us’ in the help menu.

    1 user thanked author for this post.
    #90695

    Appreciated.  I did make any enquiry (services) 3 months ago, without a response, I’ll try again.

     

     

Viewing 6 posts - 1 through 6 (of 6 total)

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