STOP SYSTEM

Viewing 3 posts - 1 through 3 (of 3 total)
  • #69001

    I do not want automated trades to stay open over weekends.

    I know how to quit system with specified time and date, but then I have to adjust it weekly. This is not a problem, but it is then not possible to back test for longer than a week.

     

    Any ideas to stop system specified time on Friday, restart automatically on Monday?

     

    Thank you

    #69010

    Hi,

    Instead of using a fixed date, you can use the CurrentDayOfWeek.

    To learn more : https://www.prorealcode.com/documentation/category/dateandtime/

    Regards,

    Pierre

    #69201

    @Pierre do you know why we do not have a ‘currentday’ function in PRT?

    But we have a ‘day’ function?

    I have oftentimes needed to use something like:

    If day = currenday Then…

    Instead I now have to try and work around it by using:

    If month = currentmonth and dayofweek = currentdayofweek Then…

    But this is much less ideal than simply having a currentday function.

    We already have currentyear, currentmonth, currentdayofweek, currenthour, currentminute so why not currentday?

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

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