Help me understand Gunbot’s MFI – Money Flow Index

Do you want to know more about Gunbot’s Money Flow Index, or MFI?  Here are some things you will want to know.

What’s going on

The BTC/USD money flow index (MFI) is calculated by Gunbot looking at the ASK book of BTC/USD and takes both price and volume information. It’s supposed to help indicate overbought or oversold conditions, much like RSI (Relative Strength Index) does. However, RSI indicator is price-only, and the benefit of the MFI is that it uses volume as well. Volume can help predict a pump or dump.

So, MFI is a volume-weighted RSI-type metric. If BTC/USD is oversold, the MFI number goes lower and lower. The idea is that oversold BTC/USD means the volume is growing on the ASK book, and that means there may be a pump of BTC soon.

MFI is a volume-weighted RSI-type metric

Why MFI is important to some

Anyone who’s been around crypto a while knows that pumping of BTC price might mean the altcoin’s value will drop in contrast. So, OKKIES_MODE is a feature Gunbot offers that allows you to temporarily stop Gunbot from trading if it senses a BTC pump coming up.

For a long time in crypto, when BTC “mooned” (shot up in value quickly), the altcoins bled in the streets.  There wasn’t enough liquidity or ability to buy alts with anything but BTC.  But as the market grew, and more ETH pairs, BCH pairs, XMR pairs, USDT/TUSD/USD pairs came online, there were more ways to buy altcoins than just with BTC.  For this reason, it’s more and more common that when BTC moons, so will several altcoins, which is different than it was for many years.

The original scenario of “BTC rises signals ALTs demises” is still valid for many pairs much of the time.  Because of this, if BTC rises and ALTs drop, Gunbot would normally see a price drop of an ALT as a buying opportunity.  It would buy the ALT and then be left with a bag because BTC kept rising and rising, and then set a new high and sit there.  The likelihood of the ALT price recovering any time soon was not very high.

OKKIES_MODE was created to help Gunbot prevent getting into a bag situation.

But more recently, it has indicated the opposite, so it’s not as hard and fast of a rule as it used to be.  For this reason, the savvy Gunbotter won’t just blindly turn this on or off – it doesn’t always mean it will protect against bags all the time.  It is recommended that Gunbotters review pair-by-pair what that specific coin pair’s likelihood is of tanking when BTC goes up.  You can use Allanster’s backtesting tuners on Trading View for help with that.  Check out the tuners on Trading View or two posts on Gunthy Forums: here and here.

How it’s Used

BTC_MONEY_FLOW is the setting in the config you want it to use as a threshold to decide whether to make trades or not.  OKKIES_MODE is what you set to true or false as to whether or not you want Gunbot to collect (v8) or care (v8 and v9) about this metric.

Default setting:

Most strategies come with default setting of “true” and “35” in Gunbot version 8.0.3.  TSSL Strategy uses default of “false” and “32”.

"OKKIES_MODE": true,

On some exchanges, the MFI isn’t calculated easily or consistently.  Be sure to review console logs for the MFI values and make sure they are coming across, if you have OKKIES_MODE turned on.  In Gunbot version 8.0.3, if OKKIES_MODE is false, then the Money Flow Index values will show “undefined”.

When MFI has prevented Gunbot XT from buying, you will see a message that says

There is too much enthusiasm… waiting to buy


  1. If Gunbot produces bags for you when BTC price pumps, consider enabling OKKIES_MODE and setting the `BTC_MONEY_FLOW` to 35 or lower.
  2. If your exchange or pair produces “undefined” results for MFI when you have `OKKIES_MODE` enabled, disable it.
  3. Before blindly setting this variable, research a coin pair’s history of reaction to BTC pumps.