Help coding yesterday’s price at 12:00

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #78923 quote
    MacroTMacroT
    Participant
    Average

    Hi,

    I need some help coding the following

    For a 24 hour market for Germany 30 and for timeframes of 30 min and 15 mins I need to display yesterday’s price at 12:00

     

    Thanks in advance

    #78932 quote
    VonasiVonasi
    Moderator
    Master
    if time = 120000 then
    a = close
    endif
    
    return a

    The above will work on any time frame faster than daily.

    #78937 quote
    MacroTMacroT
    Participant
    Average

    Perfect thats exactly what I needed

    thanks

    #78939 quote
    MacroTMacroT
    Participant
    Average

    One more question – same set up ie Germany 30 and 15 min chart

    If the time currently is greater than 11:00am how do I find the low between 07:00 and 08:00?

     

    Thanks

    #78950 quote
    VonasiVonasi
    Moderator
    Master
    if time = 064500 then
    highprice = close
    lowprice = close
    endif
    
    if time >= 070000 and time < 081500 then
    highprice = max(highprice, high)
    lowprice = min(lowprice, low)
    endif
    
    return highprice as "Highest Price", lowprice as "Lowest Price"
    #78953 quote
    MacroTMacroT
    Participant
    Average

    thanks once again for your swift and perfect response – saved me a lot of time

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

Help coding yesterday’s price at 12:00


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
MacroT @macrot Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by MacroTMacroT
8 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 08/24/2018
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...