sclark39

BBLathe2: Bollinger Band Lathe w/ Elder's Force Index [sclark39]

Welcome to the second version of the BBLathe!

This shows Bollinger Bands centered on a horizontal basis, to make it easier to see how volatility is changing and identify squeeze opportunities. By default Bollinger bands are calculated using an exponential moving average and an improved higher precision stdev implementation, but this can be disabled. Version 2 also shows Elder's Force Index as a white histogram, so you can see some volume information to help confirm the power of the bears/bulls. The green/red shadow shows how the Bollinger's basis is changing, and when it is going up there will be a green shadow underneath the basis line (this can be inverted in the settings). There is also price line (yellow) showing the location of the price within the Bollinger Bands .

Use this indicator for trades at your own risk, I made this for fun and it is not a trade recommendation.

That being said, if you like my work please tip me!

ETH: 0xf8E0Ea503B5c833fD4546E7fa2c70EcE42A27C8A

Please comment with feedback and requests!
Release Notes: Added option to color the force-index based on if it is positive or negative, as requested by @gianfranco60 !
Release Notes: Fixing preview image
Remove from Favorite Scripts Add to Favorite Scripts
Hi there,
Very nice script...but can you explain why sometimes BB's aren't displaying for some coins (crypto market). Tried to understand it but i can't...

All the best
Chris
Reply
@phohat, Which ones? I can check it out.

My guess is because they're priced either really high or really low compared to stocks. I already added a fix for some cryptocurrency, but I haven't tested it in a while. I mostly use this for stocks.
Reply
phohat sclark39
@sclark39,
Typically like TRX/BTC and/or SNT/BTC on Bittrex.
Bands reappear sometimes but after a long while...

Thank you
Chris
Reply
very nice script ... but does someone know, how calculating BB's was meant by John Bollinger? With or without Bessel's correction?
Reply
@michl, I'm not sure, I'd love to know.

My understanding of it is that Bessel's correction is needed when the calculation uses the mean of a sample like this rather than calculating the mean for the entire population. It reduces the bias and I think makes the calculation more accurate.
Reply
Is is a good chart but I think you should change the colour of the colomns when the volume is below zero
Reply
sclark39 gianfranco60
@gianfranco60, Done. I've added the option in the input settings. Check it out!
Reply
The function: stdev2( mean, src, len ) => sqrt( sum( pow( src - mean, 2 ), len ) / ( len - 1 ) ) has mean as a parameter, so it is taking mean from the boll function then?
Reply
sclark39 syracusepro
@syracusepro, Ah, yes. The mean is calculated in the boll function on line 28. By default it is the EMA of the close price over 20 bars. It is passed in like this because you should use the same mean value for calculating the stdev as you use for the basis.

This is using the two-pass algorithm for stdev, with Bessel's correction. It is mathematically equivalent to Pine's version, but doesn't suffer from the same precision issue. If you want to see more about that, check my comments here:
Reply
What values fill the mean?
Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar Shows How It Works Chart Features Pricing House Rules Moderators Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Help Center Refer a friend Feature Request Blog & News FAQ Wiki Twitter
Profile Profile Settings Account and Billing Refer a friend My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out