prashanthraju

Body Gap Detector


This script was inherited from "GAP DETECTOR" by Asch- and the modified version is being published with consent of the author.

This script identifies gap up or gap down between candle bodies (for the selected time frame). The original script has been reworked to consider Open/Close instead of the High/Low. It identifies "Gap" up/down and indicates them with markers drawn from "Open/Close" of one candle to the "Close/Open" of another.

The default setting is to consider the last 1500 candles. "Gap Up" is indicated by Green bars and "Gap Down" is indicated with Red bars.
Release Notes: Name change.
Release Notes: Performance update. Can traverse up to 5000 candles in history (depending on system capabilities). Resolves the "Script took more than 200ms" error for most of the charts.
Release Notes: Performance fix to save time in loops. Can traverse up to 5000 candles in history (depending on system capabilities). Resolves the "Script took more than 200ms" error for most of the charts.
Release Notes: Performance enhancements. Moved default candle count to 3000 (max: 5000).

Note: Observed on a couple of occasions (w.r.t stock indexes), the script missed a couple of recent gaps. Please (re)validate your charts visually.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Comments

Bro ek ye bna de yaar.... Same isi me hi jo 1min pe bhi kaam kre...

For Gapup:- previous to previous close < prev low

For Gapdowon :- Previous to previous close > prev high

Sbko yhi chahiye isse pta chalta he ke gap fill hua he yaa nhi
Reply
finally something simple, ty bro
Reply
any chances that u can also create wicks also?
Reply
prashanthraju THELEGENDSINGH
@THELEGENDSINGH, In case you are yet to come across one for wicks, "GAP DETECTOR" by Asch- does that.
Reply
Thank you! Love the simplicity of it
Reply