largest price range for last 10 trading days

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #180087 quote
    Alfy
    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
    robertogozzi
    Moderator
    Master

    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
    Alfy
    Participant
    Average

    thanks so much Roberto

    #180296 quote
    Alfy
    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
    robertogozzi
    Moderator
    Master

    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.

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 robertogozzi
4 years, 3 months ago.

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