largest price range for last 10 trading days

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #180087 quote
    AlfyAlfy
    Participant
    Average

    Good afternoon guys, im looking to create an indicator that shows when todays trading range (high – low) is the greatest of the last 10 trading days. Is there an easy way to code this please?

    Thanks in advance

    #180093 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    There you go:

    Timeframe(Daily) //or Timeframe(Daily,UpdateOnClose)
    HIrange = highest[10](range)
    Timeframe(Default)
    Return (HIrange = range) as “Max. Range”
    Alfy thanked this post
    #180100 quote
    AlfyAlfy
    Participant
    Average

    thanks so much Roberto

    #180296 quote
    AlfyAlfy
    Participant
    Average

    One last thing, how can i change the code so that i find the largest trading range thats an upday (close-open) compared to only other updays of the last 10 trading days please? Any help much appreciated.

    #180305 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    This will return the highest range of the updays in the last 10 days:

    Timeframe(Daily) //or Timeframe(Daily,UpdateOnClose)
    HIrange = highest[10](range * (close > open))
    Timeframe(Default)
    Return (HIrange = range) as “Max. Range”
    Alfy thanked this post
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

largest price range for last 10 trading days


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Alfy @alfy Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by robertogozzirobertogozzi
4 years, 11 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 10/21/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...