June 5

13 comments

MCVI Indicator and Strategy on Daily Charts

By Jeff Swanson

June 5, 2017

Automated Trading Development, EasyLanguage, Indicator Code, MCVI, mean reversion, Modified Chartmill Value Indicator, oscillator

A while back we posted an article called, “Modified Chartmill Value Indicator“, the author presented an indicator that might prove helpful in your trading. The indicator is an oscillator which highlights overbought and oversold conditions. The author created a simple test strategy to test the effectiveness of the strategy. The results looked promising and you can read about them here.

The original article provided the indicator and strategy as Amibroker code. I’ve received many requests to provide an EasyLanguage equivalent. So here it goes.

The MCVI Indicator

The EasyLanguage code is at the bottom of this article. It’s available as a text file and as an ELD file which can be imported directly into your TradeStation Development Environment. Below is an example of the MCVI applied to the daily chart o the S&P.

MCVI Indicator (Lower Pane) on Daily Chart of Emini S&P

Trading Model Rules

The original article tested the indicator on weekly data of the S&P 500 Index, the Russell 2000 index, and the NASDAQ 100 index from January 2000 to January 2013. I would like to perform a similar test with daily data in order to generate a few more trades. I will be using the same buy/sell triggers and market regime filter as the original article.

  • User Specified Look-back period (N): 15 days
  • Long Entry: MCVI crosses below -0.51
  • Short Entry: MCVI crosses above +0.43
  • Moving Average Filter Periods: 230 days
  • Long Exit: After 35 days
  • Short Exit: After 25 days

If you review the original article, you can see I simply took the weekly parameters and multiplied them by five to generate my daily parameters. The assumption is there are five trading days in one week.

Testing Environment

Before getting into the details of the results, let me say this: all the tests within this article are going to use the following assumptions:

  • Starting account size of $25,000
  • Dates tested are from 1997 through December 31, 2013
  • One contract was traded per signal
  • The P&L is not accumulated
  • $30 was deducted per round trip for slippage and commissions
  • There are no stops

In-Sample Results

The original article used a period through December 31, 2013, to optimize the inputs. Thus, I’m calling this segment of the data our in-sample segment. Below is how the strategy performed with a $25,000 account applied for each of the three markets.

S&P (ES)

NASDAQ (NQ)

RUSSELL(TF)

Net Profit

$26,506

$33,290

$50,040

Profit Factor

2.11

3.06

2.94

Total Trades

34

36

31

%Winners

59%

67%

61%

Avg. Trade Net Profit

$779.56

$924.72

$1,614.19

Annual Rate of Return

4.70%

6.22%

9.76%

Max Drawdown (Intraday)

38%

23%

51%

Max Drawdown(Close)

25%

17%

29%

Conclusion

We succeed at generating more trades by moving the timeframe to a daily bar. During our testing we used the same optimized parameters generated on a weekly chart yet, they held up well in our test. I would guess that optimization on the daily chart would produce even more optimal returns. The equity charts look decent across our three different markets, which is not too surprising since they are correlated.

As stated in the original article, this trading model is nothing more than a test of the MCVI indicator. This is not a trading system that can be traded with money. However, it might be possible to use this indicator in building your own systems.

Jeff Swanson

About the author

Jeff has built and traded automated trading systems for the futures markets since 2008. He is the creator of the online courses System Development Master Class and Alpha Compass. Jeff is also the founder of EasyLanguage Mastery - a website and mission to empower the EasyLanguage trader with the proper knowledge and tools to become a profitable trader.

    • I’ve not compared the two indicators. In general the MCVI indictor is an oscillator based upon standardized deviation away from a moving average. The RSI is also an oscillator but computes a ratio of high closes vs lower closes.

  • What’s “MP” in the code? When I try to compile it throws an error saying it’s not recognized. Is the code referring to another function or variable?

    • MP is a built-in variable that holds the current market position. 0 = flat, 1 = long, -1 = short. If your compiler does not recognize MP you will need to declare it and then assign it. Something like this will need to be placed within your code:

      Variable: MP(0);
      MP = MarketPosition;

  • Hi Jeff,

    Some comments about the MCVI indicator and strategy. At the “Inputs:” the value “N(NUMERIC)” draws an error message reading “arithmetic (numeric) expression expected here”. Why is this occurring?

    At the line reading “MCVI = Result” the error message reading “assignment to a function not allowed” appears. Why?

    Why would you not plot a zero line, a LowValue line of (-0.51) and a HighValue line of (+0.43)? Yes, I know that I am free to add those but the question is why have you omitted such?

    Since neither the indicator and the strategy will verify I would like to remove them from their respective file folders (not any given chart). How do I do that?

    I have found your articles and experiments interesting and sometimes useful; that is, when I can get them to work on TradeStation 9.5 Update 17.

    Jim Stanclift
    opus4@comcast.net

  • {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

    Learn To Code & Build Strategies
    Using EasyLanguage. 

    >