CB: CCI & MFI Strategy

Custom Development for a Backtest Rookies professional services customer. Published for customer testing and acceptance.

Release Notes:
Update - Added Start and End date inputs to control backtest period.
Release Notes:
Fixed for bug introduced in last update
Release Notes:
Update to change stop logic to move with the open rather than close price
Release Notes:

  • Added ability to trade in one direction only
  • Added a custom trailing stop
  • Fixed Heikinashi source issue
Release Notes:
Update to always exit with a traling stop. Do not allow opposite signals to exit a position.
Release Notes:
New Features

  • Added EMA filter to MFI entry
  • Added wait period variable to wait for a favourable EMA conditions following an entry signal
Release Notes:
Update to stop double entry when both entry conditions evaluate true at the same time.
Release Notes:
Update with new features:

  • Seperate EMA settings for MFI
  • Added min consecutive down days setting
  • Added consecutive checks for CCI entry
  • Added TP setting
  • Added seperate trade direction control for MFI - So the trade direction can be set independently of CCI


  • Fix for consecutive days check.
  • Fix typos in parameter description strings
Release Notes:
Fix for bug consecutive up / down days bug introduced in last update
Release Notes:

Added independent take profit and stop loss inputs for the short side.

Invite-only script

Access to this script is restricted to users authorized by the author and usually requires payment. You can add it to your favorites, but you will only be able to use it after requesting permission and obtaining it from its author. Contact BacktestRookies for more information, or follow the author's instructions below.

TradingView does not suggest paying for a script and using it unless you 100% trust its author and understand how the script works. In many cases you can find a good open-source alternative for free in our Community Scripts.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?

Warning: please read before requesting access.