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
JSParticipant
Senior
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
thks but it did not work ?
JSParticipant
Senior
Hi @thebaron
Did you add the indicator to the “price”…?
What was the time frame of your open chart…?
JSParticipant
Senior
Hi @thebaron
Strange… It works for me…
What market is “esxxx”…?
JSParticipant
Senior
Here’s what I see on the SP500…
What version of ProRealTime are you using…?
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”
JSParticipant
Senior
The indicator can be improved but does it work for you now…?
Do you see the lines and the text…?
when i test yesterday i did not increase the view, i have it on the chart
JSParticipant
Senior
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
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
JSParticipant
Senior
The line(s) start at the “High” or “Low” of the previous period (30 min)…