Widest range from high to low last 20 days

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #114897 quote
    Dr ManhattanDr Manhattan
    Participant
    Senior

    How can I find the widest range from high to low of any the previous 20 days from now? any ideas? it should involve <code>range</code> and <code>summation</code>, or? anyone know how to write it?

    #114899 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    There you go

    x = highest[20](range)
    Dr Manhattan thanked this post
    #114900 quote
    VonasiVonasi
    Moderator
    Master
    bigrange = high = low
    
    for a = 1 to 19
    bigrange = max(bigrange,high[a] - low[a])
    next
    
    Dr Manhattan thanked this post
    #114901 quote
    Dr ManhattanDr Manhattan
    Participant
    Senior

    Aaaah! always so clear when the answer is there!! šŸ™‚ thanks

    #114903 quote
    GraHalGraHal
    Participant
    Master

    Both codes added as Log 189 and 190 here

    Snippet Link Library

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTimeā„¢ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Widest range from high to low last 20 days


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 4 replies,
has 4 voices, and was last updated by GraHalGraHal
6 years, 9 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 12/14/2019
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...