How to find the MAX valure of the last 10 to last 5 days?

Forums ProRealTime English forum ProScreener support How to find the MAX valure of the last 10 to last 5 days?

Viewing 13 posts - 1 through 13 (of 13 total)
  • #253944

    I can calculate the Amplitude between the highest and the lowest in the last 10 days as follow:

    But if I want to calculate the Amplitude between the highest and the lowest between the last 20 and last 10 days. How to do?

     

    #253946

    there are 2 ways:

     

    1 user thanked author for this post.
    #253948

    if the effect the same, the first way is much simple than the second one, right?

    #253951

    Yes! first option

    #254520

    Hi Ivan,

    To your code “MyHighest = highest[10](high)[10]”, what does the first 10 mean and what the second 10?  I can’t find this syntakt in the manual. 

     

    #254524

    The 10 on the far left means that the search is for the highest price of the last 10 periods.
    The 10 on the far right means you want to retrieve what the scan reported 10 bars ago.

    It is equivalent to writing:

    I would like to point out that your line is NOT scanning for the highest price, but for the highest CLOSE, since you didn’t specify what to scan and so it defaults to CLOSE:

     

    1 user thanked author for this post.
    #254532

    Thanks!

    In order to better understand what you said, here an example: Today is 13.12.2025. If I want to find the highst high between 01.12.25 and 05.12.2025, I have to do as follow?

    MyHighest = highest[5](high)[8]

    #254539
    JS

    Hi,

    You are using the instruction syntax correctly; however, you need to take into account that the instruction works with bars rather than dates…

    The number of bars does not correspond one-to-one with calendar days due to holidays and weekends…

    A bar represents a trading day, and on holidays and weekends the market is closed…

    1 user thanked author for this post.
    #254549

    Hi JS,

    Many thanks!

    1 user thanked author for this post.
    avatar JS
    #254550

    Thanks!

    In order to better understand what you said, here an example: Today is 13.12.2025. If I want to find the highst high between 01.12.25 and 05.12.2025, I have to do as follow?

    MyHighest = highest[5](high)[8]

    Your line retrieves the highest price in a 5-day range, starting from the 8th bar prior to the current day (see attached pic).

    1 user thanked author for this post.
    #254552

    Hi Roberto,

    Your picture tells more than 1000 words. Many thanks! 🙂

    1 user thanked author for this post.
    #254553
    JS

    Hi Roberto,

    I think the picture is not correct because December 6 and 7 fall on a weekend, so no bars are created on those days…

    Based on the actual trading bars…

    MyHighest = Highest[5](High)[6]

    #254554

    That’s just an example not related to real data, as it’s a bit complicated to scan backwards for actual trading days before executing HIGHEST, etc…

     

     

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

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