How to exit condition if a stock is bought after 20 days?

Forums ProRealTime English forum ProOrder support How to exit condition if a stock is bought after 20 days?

Viewing 5 posts - 1 through 5 (of 5 total)
  • #90597

    Hi,

    I am going to create a backtesting/trading system. One of my exit conditions is: If a stock is bought after 20 days, it will exit. How is the code for that?

    Besides, I don’t want to set the fix number of the stock. I want to use 5% for example of the capital. How to do that?

    Regards

     

    #90621

    For position size, there is an interesting topic with some code snippets: Dynamic Position size

    How to exit after n bars:

    Exit after (n) days

    Exit after 10 bars?

     

    #90774

    Hi Nicolas,

    Thanks for the reply. I wonder where can I find the documentation of ProBacktest(as PDF or HTML)?

    #90775

    Besides, as I use the TOTALEQUITY, I got error that this is not defined. Also the INITIALCAPITAL is not defined.

    #90961

    I find out the document.

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

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