opening range

Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts
  • #85057 quote
    Mert
    Participant
    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

    #85060 quote
    robertogozzi
    Moderator
    Master

    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
    #85074 quote
    pippo999
    Participant
    Junior

    Ciao Roberto, I have some issue with the code, there are no line on my chart.

    Could you please export the code here. Grazie

    #85077 quote
    robertogozzi
    Moderator
    Master

    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.

    #85081 quote
    pippo999
    Participant
    Junior

    Grazie Roberto, I will try the file.

    Buon Fine di Settimana 😉

    #85091 quote
    robertogozzi
    Moderator
    Master

    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.

    #85096 quote
    Mert
    Participant
    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

    #85097 quote
    robertogozzi
    Moderator
    Master

    On which instrument and TF are you using it?

    #85099 quote
    Mert
    Participant
    Average

    I am using it on the AEX futures chart and on a 15 minute timeframe

    #85100 quote
    robertogozzi
    Moderator
    Master

    After commenting out line 1. this is the result on AEX cfd (with IG) on a 15-minute chart.

    #85102 quote
    Mert
    Participant
    Average

    Strange. This is what I see in the AEX futures. One line.

    #85105 quote
    robertogozzi
    Moderator
    Master

    I have no idea why such difference.

    Try changing colors.

    #85107 quote
    Mert
    Participant
    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

    #85108 quote
    robertogozzi
    Moderator
    Master

    What version of ProRealTime do you have?

    Is that T2, by chance?

    #85109 quote
    Mert
    Participant
    Average

    can it be: pro realtime complete?

Viewing 15 posts - 1 through 15 (of 27 total)
  • You must be logged in to reply to this topic.

opening range


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Mert @mert Participant
Summary

This topic contains 26 replies,
has 4 voices, and was last updated by Marius
7 years, 2 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 11/16/2018
Status: Active
Attachments: 8 files
Logo Logo
Loading...