Highest since last 11pm irrespective of timeframe

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #162971 quote
    darkodarko
    Participant
    Junior

    Hi,

    I have a little indicator to identify the highest point on the last 24 hours (starting from 11pm) on a 1 hour chart, but if I want to use a 5mn chart, I need to change the [24] into [288], hence a different indicator.

    Would there be a way to code differently so that a single indicator gives the right information without changing the lookback data irrespective of the timeframe I am on?

    Thanks

    if hour=23 then
    a=highest[24](high)
    endif
    return a
    #162973 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Post your topic in the correct forum:
    _ ProRealTime Platform Support: only platform related issues.
    _ ProOrder: only strategy topics.
    _ ProBuilder: only indicator topics.
    _ ProScreener: only screener topics
    _ General Discussion: any other topics.
    _ Welcome New Members: for new forum members to introduce themselves.

    Thank you 🙂

    You can use the MTF (Multi Time Frame) support:

    Timeframe(1 hour,UpdateOnClose)
    if hour=23 then
       a=highest[24](high)
    endif
    Timeframe(default)
    return a
    

    it’ll work on any TF up to 1-hour (not higher).

    #162978 quote
    darkodarko
    Participant
    Junior

    Thanks, but actually, I would like to use it for lower timeframes (15mn, 5mn, 2mn, 1mn)

    How do I do that?

    #162979 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    You can use it in any TF <= 1 hour.

    #162980 quote
    darkodarko
    Participant
    Junior

    very sorry, I am a bit thick, could you give me an example on the 5mn timeframe please?

    #162986 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Add it to your chart, then select 5 minutes, or 1 minute, etc…. not higher than 1 hour.

Viewing 6 posts - 1 through 6 (of 6 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

Highest since last 11pm irrespective of timeframe


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
darko @darko Participant
Summary

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

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