Code maximum number of positions

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #90445 quote
    David Thompson
    Participant
    New

    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 quote
    Nicolas
    Keymaster
    Master

    I can suggest these useful instructions for that purpose:

    COUNTOFPOSITION

    COUNTOFLONGSHARES

    COUNTOFSHORTSHARES

    #90525 quote
    David Thompson
    Participant
    New

    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.

    Nicolas thanked this post
    #90687 quote
    David Thompson
    Participant
    New

    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 quote
    Vonasi
    Moderator
    Master

    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:

    Trading Programming Services

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

    David Thompson thanked this post
    #90695 quote
    David Thompson
    Participant
    New

    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)
  • You must be logged in to reply to this topic.

Code maximum number of positions


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
David Thompson @hethvan Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by David Thompson
7 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/04/2019
Status: Active
Attachments: No files
Logo Logo
Loading...