Range Box Indicator

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #27534 quote
    ajmTrader
    Participant
    New

    Hi all,

    This is likely very basic for those that can.  I am looking for a box indicator that shows the high and low of a range (adjustable times).  For examples sake lets say ) 00:00 – 06:00. and that can show historical data too.  Some of the historical data indicators ive seen ‘connect’ from day to day, I would like for each days box to be independent if possible.

    Can anyone help?

    Many thanks.

    #28044 quote
    Nicolas
    Keymaster
    Master

    It’s possible for historical data, but the box of the current day will appear at 06:01, is it a problem?

    #28059 quote
    ajmTrader
    Participant
    New

    Hi Nicolas,

    Thanks for the reply!  The box appearing at 6.01 would not be an problem.  Would it be possible to have adjustable times for the box range?

    #28091 quote
    Nicolas
    Keymaster
    Master

    Here is the code to draw rectangle between 2 schedules. Please let us know if it looks how you expect. Thank you.

    starttime = 050000
    endtime = 090000
    
    if intradaybarindex=0 then
    hh = 0
    ll = 0
    alreadydrawn = 0
    endif
    
    if time=starttime then
    startbar=barindex
    endif
    
    if time=endtime then 
    endbar=barindex
    endif
    
    if time>=starttime and time<=endtime then
    if high>hh then
    hh = high
    endif
    if low<ll or ll=0 then
    ll = low
    endif
    endif
    
    if time>endtime and alreadydrawn=0 then
    drawrectangle(startbar,hh,endbar,ll)
    alreadydrawn=1
    endif
    
    RETURN 
    #28098 quote
    ajmTrader
    Participant
    New

    Hi Nicolas,

     

    Thank you for the code.  It’s basically what I’d like however there are two things I wonder if you can modify?

    1.Box range able to go over the midnight period.  For example 22:00 – 07:00

    2.  Functionality to change line and box fill colour

     

    Many thanks!

    #28100 quote
    ajmTrader
    Participant
    New

    One final thing can it only display H1 and lower timeframe?

    Also on M5 timeframe and H1 it seem’s to draw oddly.

     

    Many thanks

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

Range Box Indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
ajmTrader @ajmtrader Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by ajmTrader
8 years, 11 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/07/2017
Status: Active
Attachments: No files
Logo Logo
Loading...