Overlay Gap Boxes

Hello,

I’d please like assistance with coding a custom javascript indicator. I have coded other indicators based on tutorials, videos, and community indicators - but this one I can’t seem to get to work.

I use candlestick-bar charts. This indicator will overlay the candlestick-bar charts. Here are the specifications:

  1. This indicator will highlight gaps by overlaying semi-translucent rectangle shapes on top of candlestick-bars. There are two kinds of gaps, a bear-gap and a bull-gap:

1A. A bear-gap occurs when a candlestick-bar’s high does not overlap with the low of the candlestick-bar before last.

1B. A bull-gap occurs when a candlestick-bar’s low does not overlap with the high of the candlestick-bar before last.

  1. The semi-translucent rectangle shapes should have the following properties:

2A. height should be the height of the gap (as described in 1 above)

2B. width should of the equal the width of two candlestick-bars

2C. opacity should be 50 percent

2D. color should be red for a bear-gap and blue for a bull-gap

Please find a mockup below.

Thank you for your assistance.

I’m software engineer and tradovate indicator/strategies developer. Contact me at obacommunication@gmail.com

I know that it is completely unrelated… but have you looked at Renko charts?

is not this the FVG? I am developer and you can drop me an email on timmfain@gmail.com