High/low of the day so far

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

    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
    KVS
    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ález
    Moderator
    Master

    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
    KVS
    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.

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 KVS
10 months, 3 weeks ago.

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