TradingView
prashanthraju
1 Okt 2020 pukul 00.26

Body Gap Detector 

RELIANCE INDSNSE

Huraian


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.

Nota Keluaran

Name change.

Nota Keluaran

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.

Nota Keluaran

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.

Nota Keluaran

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.

Nota Keluaran

Bug fixes to accurately detect gaps. Added few more comments for clarity.

Nota Keluaran

Fixing chart display.
Komen
kadirs20
I want to go back to previous version. What should I do?
bujordaniel87
hi i did add to chart but i dont see anything ... its still working ?
jcharshal
Hi i tried increasing the max value above 5000 in the code but it gives an error. Can that be increased for back testing purposing on 5-15mins chart . Thanks
prashanthraju
@jcharshal, I think that's the (TradingView) upper limit of the number of candles that can be traced back.
jcharshal
@prashanthraju, Thanks brother Understood .
vjprogrammer986
can you explain the below logic? unable to understand it
for i = (j-1) to 0
test1 = open
test2 = close
sup_gap := min(sup_gap, (test1>test2 ? test2 : test1))
if ((sup_gap - inf_gap)/(syminfo.mintick*10) < 3)
gap_bull := false
break
nomayan99
Hi
Thanks for your coding
but after some hour using and testing this detector,
it continuesly send me error about max_bars_back
and even when I change the vale of that still get error
can you please help me what to do
thanks
akshayaranka
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
wjeon270
finally something simple, ty bro
THELEGENDSINGH
any chances that u can also create wicks also?
Lebih