Display daily close on hourly chart

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #139494 quote
    PhilA
    Participant
    New

    How to make a custom indicator that displays the highest daily close of x days on an intraday chart? For example highest close of last 52 days on an hourly chart?

    I’ve tried this and it doesn’t work:

    DailyClose=DCLOSE(1)
    Upper = HIGHEST[52](DailyClose)
    Lower = LOWEST[52](DailyClose)
    
    RETURN upper AS”High”, lower AS”Low”

    Thanks.

    #139497 quote
    robertogozzi
    Moderator
    Master

    Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read. Tahnk you 🙂

    Your code will find the highest value within the last 52 1-hour bars (just a bit more than a couple of days).

    If you have version 11 you can use the MTF (Multi Time Frame) support:

    Timeframe(1 Day)
    Upper = highest[52](close)
    Lower = lowest[52](close]
    Timeframe(default)
    RETURN upper AS”High”, lower AS”Low”

    if you have version 10.3…. you can’t, unless you use an iteration.

    #139498 quote
    PhilA
    Participant
    New

    Ah ok, thank you.

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

Display daily close on hourly chart


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
PhilA @phila Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by PhilA
5 years, 7 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 07/17/2020
Status: Active
Attachments: No files
Logo Logo
Loading...