Dutchinvestor

<50% Body Candle

1062 6 87
Script to identify candlesticks with less than 50% body of total high low candlestick . Places a dot inside the candle. Make sure indicator is moved in the top of Objects Tree so the dot will not be hidden behind the candlebar.
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
study("<50% Body Candle", overlay = true)

// Input variable for maximum candlestick body size in relation to high low candlestick range
MaxBodySize = input(defval = 50,type = float, title = "Minimal Body Size (%)")

// If you want to draw a shape in the middle of candlestick body then this variable is needed
// Use with plotshape and location = location.absolute
MidCandleBody = (open + close) /2

// Create candlestick low high range comparison variable
LowHighRange = ((high - low) / 100) * MaxBodySize

// Avoid negative total Candlestick body size
CandleBodySize = iff(close >= open, close - open, open - close)

// Evaluation to determine drawing points
DrawPoint = iff(CandleBodySize<=LowHighRange, MidCandleBody,na)

// Plot drawing points
plotchar(DrawPoint,char = '▪', color = white, location = location.absolute, transp = 0,size = size.tiny)
michaelstanford
7 months ago
how do you add this to the chart. can someone please help me?
Reply
Dutchinvestor PRO
7 months ago
Hi Michael,

Open your candlestick chart layout and click the indicator button. Search on: <50% Body Candle When search results come up, click on the title and you should see the body candle indicator on your chart.
Reply
prabodh PRO
6 months ago
thanks a lot I'm using your idicator
Reply
Hello !
Thanks for the tool , it`s the only tool on my chart but it still seems to get hidden behind the candles .

any solvings ? thanks
Reply
Dutchinvestor PRO pccassetmanagement
2 months ago
@pccassetmanagement, I responded on your PM message: "Make sure indicator is moved in the top of Objects Tree so the dot will not be hidden behind the candlebar."
Reply
Hi Dutchinvestor , This is a very nice tool, thank you for sharing!

Regards,
Jose
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
France
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out