This script performs the basic Shannon entropy on the closing value of the stock. Additionally, it performs the trailing first and second derivatives of the Shannon Entropy, giving you more information about its movement.
You can change the "Source" to be whatever value you like.