Setting Maximum Contracts in ProBackTest

Forums ProRealTime English forum ProOrder support Setting Maximum Contracts in ProBackTest

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

    Hey Crew,

    I am currently running the following hourly charts however on the ProBackTest it enters into a new contract every hour even if it is already in a position.

    I want to limit the strategy to being maximum 1 contract long or short at any given time and not continue to accumulate contracts.

    My current code is below. Does anyone know how to help with this?

    Cheers, Sam

     

    #150929

    Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read. Thank you 🙂

    As to your code, it’s impossible that “it enters into a new contract every hour even if it is already in a position“. To accomplish that you should replace line 2 by:

    So, did you already backtest it? How could you spot more than 1 position at a time?

    append this line to your code to monitor the number of positions accumulated:

     

     

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