OPEN-SOURCE SCRIPT

Ectopic Bar by Moti Rakam

Ectopic Bar is an indicator that highlights a pin-bar candle that has divergence in it's shape and volume delta. To find volume delta, code of standard Up/Down volume indicator has been used.

PIN BAR: pin bar are marked by using Close Range option parameter. Default value is set to 0.35 which implies any candle that closes in the 35% of its high/low will be considered a pin bar (of course the code also ensures that rest of the bar body is only a wick).

HOW IT WORKS:
Up/Down volume variables "Up Volume" and "Down Volume" are checked against the shape of the pin bar to find an ectopic situation. For example, if a bullish pin bar candle (a bullish hammer) has more sell volume than buy volume, that's an ectopic situation. The bullish hammer shows a buying push from the bottom of the wick, instead the up/down volume indicator shows there were more sell orders than buy orders. Hence the ectopic situation. Similarly, an inverted hammer (a bearish hammer) in general should have more sell volume, but instead if it has more buying volume, the indicator highlights it as an ectopic bar.

Ectopic Bars are painted in yellow colour.
Candlestick analysismotirakamvolumedeltavolumedivergence

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer