This script embodies the application of the Bollinger Band and Money Flow Index in John A. Bollinger's book "Bollinger on Bollinger Bands."
"Bollinger on Bollinger Bands" suggests a relatively method of analysis by applying the Bollinger Band to an indicator.
Here's one of the indicators, Money Flow Index.
Money Flow Index is an indicator of overbuying and overselling by reflecting the volume of transactions.
"Bollinger on Bollinger Bands" suggests using the Bollinger Band to create relative top and bottom lines for various indicators, such as Money Flow Index.
Original Money Flow Index is considered to be over-purchased if it is more than 80% and over-selling if it is less than 20%.
But if you put a bolinger band on it, you can set the standard for higher or lower over-selling and over-selling in a sustained bullish, bearish market.
This script uses the following values as the default values as recommended by "Bollinger on Bollinger Bands".
Money Flow Index for 10 days.
a bollinger band of forty days
standard deviation of 2
The above values are suitable for most stocks and markets, but sometimes there is too much or too little data inside the Bollinger Band.
It is recommended to modify each value little by little to adjust 85% to 90% of the total data to fit inside the Bollinger Band.
If the value is higher than the top line, it is considered over-purchased, and a red background color appears.
If the bottom line is crossed down, it is considered over-sold and the green background color appears.