last low/ last high

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #214849 quote
    thebaronthebaron
    Participant
    Average
    hello i m looking for an indicator showing me the last high and low from an upper time frame for or example in a 1 mn timeframe chart to have a line for the last previous 30 mn high and low until the next 30 mn change . for 1 mn bar between 9 am and 9:30 am having a line coresponding at high and low of 8:30am- 9 am if i want 30 mn high low, but to have the possibility to select different time frame inside the indicator in advance thanks
    #214852 quote
    JSJS
    Participant
    Master
    Hi @thebaron You can try this…  
    DefParam DrawOnLastBarOnly=True
    TimeFrame(30 minute, UpdateOnClose)
    xHigh1=High[1]
    xLow1=Low[1]
    
    TimeFrame(1 minute)
    DrawHLine(xHigh1)Coloured("Red")
    DrawText("#xHigh1#",BarIndex+10,xHigh1+2*pipsize)Coloured("Red")
    DrawHLine(xLow1)Coloured("Green")
    DrawText("#xLow1#",BarIndex+10,xLow1+2*pipsize)Coloured("Green")
    
    Return
    Scherm­afbeelding-2023-05-17-om-17.24.28.png Scherm­afbeelding-2023-05-17-om-17.24.28.png
    #214858 quote
    thebaronthebaron
    Participant
    Average
    thks but it did not work ?
    #214859 quote
    JSJS
    Participant
    Master

    Hi @thebaron

    Did you add the indicator to the “price”…?

    What was the time frame of your open chart…?

    #214860 quote
    thebaronthebaron
    Participant
    Average
    yes on esxxx 1 mn
    #214863 quote
    JSJS
    Participant
    Master

    Hi @thebaron

    Strange… It works for me…

    What market is “esxxx”…?

    #214864 quote
    thebaronthebaron
    Participant
    Average
    futur sp500
    #214865 quote
    JSJS
    Participant
    Master

    Here’s what I see on the SP500…

    What version of ProRealTime are you using…?

    Scherm­afbeelding-2023-05-17-om-21.50.43.png Scherm­afbeelding-2023-05-17-om-21.50.43.png
    #214870 quote
    thebaronthebaron
    Participant
    Average
    pro 11 but the value on your chart are the same between 18h-22h, i want the previous half hour high/low on 1 mn chart “or 1 mn bar between 9 am and 9:30 am having a line coresponding at high and low of 8:30am- 9 am”
    #214871 quote
    JSJS
    Participant
    Master

    The indicator can be improved but does it work for you now…?

    Do you see the lines and the text…?

    #214872 quote
    thebaronthebaron
    Participant
    Average
    when i test yesterday i did not increase the view, i have it on the chart
    #214877 quote
    JSJS
    Participant
    Master
    Hi @thebaron

    Here is the adjusted indicator…

    (You can adjust the time frames)    

    DefParam DrawOnLastBarOnly=True
    TimeFrame(30 minute, UpdateOnClose)
    HTF=GetTimeFrame
    xHigh1=High
    xLow1=Low
    
    TimeFrame(1 minute)
    LTF=GetTimeFrame
    Period=HTF/LTF
    
    For i=0 to Period-1
    If High[i]=xHigh1 then
    x1=BarIndex[i]
    EndIf
    Next
    
    DrawSegment(x1,xHigh1,BarIndex-3,xHigh1)Coloured("Red")
    DrawText("#xHigh1#",BarIndex+1,xHigh1,SansSerif,Bold,16)Coloured("Red")
    
    For i=0 to Period-1
    If Low[i]=xLow1 then
    x2=BarIndex[i]
    EndIf
    Next
    
    DrawSegment(x2,xLow1,BarIndex-3,xLow1)Coloured("Green")
    DrawText("#xLow1#",BarIndex+1,xLow1,SansSerif,Bold,16)Coloured("Green")
    
    Return

    Scherm­afbeelding-2023-05-18-om-11.49.21.png Scherm­afbeelding-2023-05-18-om-11.49.21.png
    #214880 quote
    thebaronthebaron
    Participant
    Average
    at the start i have h an l l and after no more h line  and look at the start its 12h11 and not 12h
    Capture.jpg Capture.jpg
    #214883 quote
    JSJS
    Participant
    Master
    The line(s) start at the “High” or “Low” of the previous period (30 min)…
Viewing 14 posts - 1 through 14 (of 14 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

last low/ last high


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
thebaron @thebaron Participant
Summary

This topic contains 13 replies,
has 2 voices, and was last updated by JSJS
3 years, 4 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/17/2023
Status: Active
Attachments: 4 files
ProRealCode ProRealCode
Loading...