High/low of the day so far

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #245265 quote
    KVSKVS
    Participant
    New

    Hi all,

    I am just starting out with PRT. I can see in the Glossary of the Trading Systems programming guide that DOpen, DHigh, DLow, DClose functions are available to these metrics from the n-th day before the current one; however, if the n value is not specified (or if it’s [0]) does these functions provide the Open/High/Low of the current day, so far?

    I’d much appreciate if anyone can confirm this.

    Cheers

    KVS

    #245269 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    DOpen, DHigh, DLow, DClose require parentheses “()” not brackets.

    In addition they do not assume default values, so (0) is required for the current day or you’ll get an error.

    Iván González thanked this post
    #245270 quote
    KVSKVS
    Participant
    New

    Thanks Robert. So I can use DHigh(0), for example, to call the high of the current day before the daily bar is closed?

    #245304 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Better to try it out, right?

    test=dhigh(0)
    
    if intradaybarindex=0 then
    maxToday=high
    drawvline(barindex)
    else
    maxToday=max(high,maxToday)
    endif
    
    return test coloured("blue"), maxToday coloured("red")
    robertogozzi thanked this post
    #245348 quote
    KVSKVS
    Participant
    New

    Thanks Ivan. I will try it out.

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

High/low of the day so far


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
KVS @kvs Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by KVSKVS
1 year, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/25/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...