MertParticipant
Average
Hello,
I am looking for an indicator that automatically draws the first hour ( from 0800 to 0900) opening range with 2 simple black lines reaching from 0800 hour to 2200 hour. I am struggling like hell and was hoping that someone could help me out here. I am using a 15 minute chart for trading.
Thanks in advance and regards,
Mert
There you go
DEFPARAM DrawOnLastBarOnly = true
DEFPARAM CalculateOnLastBars = 1000
IF time <= 080000 THEN
hh = 0
ll = 999999
ENDIF
IF time = 090000 THEN
MyBar = barindex
ENDIF
IF time >= 090000 AND time <= 100000 THEN
hh = max(hh,high)
ll = min(ll,low)
ENDIF
IF time >= 100000 AND time <= 220000 THEN
DRAWSEGMENT(MyBar,hh,barindex,hh) COLOURED(255,255,255,255)
DRAWSEGMENT(MyBar,ll,barindex,ll) COLOURED(255,255,255,255)
ENDIF
RETURN
Ciao Roberto, I have some issue with the code, there are no line on my chart.
Could you please export the code here. Grazie
It does not work after 22, as you asked. Change hours as you please.
It will work if you comment out, or remove, line 1. In this case you’ll will still see older lines, though.
Anyway, the file is attached.
Grazie Roberto, I will try the file.
Buon Fine di Settimana 😉
Sorry @pippo999, I attached the wrong file related to another topic. You can now download the correct file.
Please speak english in the english forum. Thank you.
Have a nice weekend.
MertParticipant
Average
Hello Roberto,
Thanks a lot but it seems not working over here. I have one line far above the price data. Do I do something wrong or do I have to adapt the code?
Thanks a lot in advance,
Mert
On which instrument and TF are you using it?
MertParticipant
Average
I am using it on the AEX futures chart and on a 15 minute timeframe
After commenting out line 1. this is the result on AEX cfd (with IG) on a 15-minute chart.
MertParticipant
Average
Strange. This is what I see in the AEX futures. One line.
I have no idea why such difference.
Try changing colors.
MertParticipant
Average
I hope you do not misunderstand but the colours you see are painted candles that I have coded. This has nothing to do with the opening range. I only, if I add the code, get a grey line far above the price action. Either way, if it is not working it is ok. I draw it by hand. Thanks for the trouble anyway and thanks fo the color scheme.
Regards,
Mert
What version of ProRealTime do you have?
Is that T2, by chance?
MertParticipant
Average
can it be: pro realtime complete?