How to count numberof instances in last 20 trading days

Forums ProRealTime English forum ProOrder support How to count numberof instances in last 20 trading days

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

    Hi guys, i have a code for distribution days below and i would like the code to calculate how many times in the last 20 trading days the condition is fulfilled. Can anyone help please?

    thanks in advance

     

    #153753

    counts each time G=1

    1 user thanked author for this post.
    #153792

    Alfy – Please follow the forum rules in any future posts and use the ‘Insert PRT Code’ button whenever you put code in your posts. I edited your post to tidy it up! 🙂

    1 user thanked author for this post.
    #153794

    First of all, thanks so much for your help. What I was trying to do was count how many times cumulatively G=1 in the last rolling 20 day period. Eyeballing it, currently we have had 3 occasions in the last 20 trading days when G=1 however your code shows only 1 occasion.

    Best regards

     

    #153801

    You can make a summation of G for a rolling period with SUMMATION:

     

    2 users thanked author for this post.
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