Help coding yesterday’s price at 12:00

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #78923 quote
    MacroT
    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
    Vonasi
    Moderator
    Master
    if time = 120000 then
    a = close
    endif
    
    return a

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

    #78937 quote
    MacroT
    Participant
    Average

    Perfect thats exactly what I needed

    thanks

    #78939 quote
    MacroT
    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
    Vonasi
    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
    MacroT
    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.

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 MacroT
7 years, 5 months ago.

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