Home » Amibroker, Nifty Technicals, coppock

Coppock, Nifty and the AFL code

5 December 2009 334 views No Comment

Here is the Formulas to calculate the coppock indicator extracted from incredible charts

To calculate the Coppock Value:

1)Calculate 14 month Rate of Change (Price) for the index. Use monthly closing price.
2)Calculate 11 month Rate of Change (Price) for the index. Use monthly closing price.
3)Add the results of 1 and 2.
4)Calculate a 10 month weighted moving average of the result.

There are a number of variations in calculation. For a more timely signal, try substituting the daily equivalent in place of monthly figures: 294 day ROC, 231 day ROC and 210 day weighted moving averages. Based on these formula i had coded for the coppock
value using 294,231,210 ROC values which suits for the daily time frame. Here is the simple coppock AFL code

For Daily time frame, Coppock can be calculated as

1)Calculate 294 day Rate of Change (Price) for the index. Use Daily closing price.
2)Calculate 231 day Rate of Change (Price) for the index. Use Daily closing price.
3)Add the results of 1 and 2.
4)Calculate a 210 day weighted moving average of the result.

Coppock AFL Code

_SECTION_BEGIN(“Coppock”);

GraphXSpace=1;
Param(“WMA”,210,2,100,1,0);
r1=ROC(C,294);
r2=ROC(C,231);
r3=r1+r2;
CP=WMA(r3,210);

Color = IIf (CP >0, colorGreen, colorRed );
Plot(CP,”", Color ,styleHistogram | styleThick );
Plot(CP, StrFormat(“Coppock Value”, CP), colorGreen, styleLine);

_SECTION_END();

Nifty Coppock had turned to positive during the end of OCT 2009. Check the above historical Nifty chart for Coppock values

Here is an interesting reading about Coppock Indicator and its history from DNA India

Related Readings and Observations

  • GANN Level Plotter for Nifty
    GANN Level Plotter INDICATOR PLOTS FOR ANY STOCK AND WORKS FINE FOR LIQUID CONTRACTS AND STOCKS. THE LEVELS ARE NOT FOR TRADING, BUT FOR REFERENCE SO THAT ENTRY AND EXIT WILL BE SMOOTH....
  • Profit Table – Amibroker AFL Code
    Here is an another interesting afl code which plots the Profit table for any sort of Instruments in Amibroker. Month-on-Month , Year-on-Year, Average monthly returns in terms of percentage can be plotted using this afl code. Sample AFL code for Nift...
  • 70/1030 EMA AFL code for Amibroker
    Here is a simple logic how to plot 70min/ 1030min EMA in your amiboker software. 70/1030 EMA crossover is a popular strategy witht the yahoo 5min charts. And if your tried with amibroker with the same 70min and 1030 min you would probably end with th...
  • KAMAS 1.0 System with StoCCI for Amibroker – AFL Code
    KAMAS 1.0 is a user-friendly interesting system based on concepts provided byKaufmann - adaptative Ma's, it is enhanced with StoCCI indicator, PPO indicator , auto-trendline and fibonacci cluster - auto fib levels wherever you click on the chart. Ful...
  • Ichimoku Cloud AFL code
    Simple AFL code for Ichimoku Cloud Charts are given here which plots only the Ichimoku cloud charts for any kind of timeframe. As usual Ichimoku performs a high role in high probability trading and this can be applied to any kind of time frame. The d...
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

No Comment »

  • Ankush said:

    HI Thanks for the AFL for coppock. Appreciate the same and efforts by you. Also can you suggest how to correct the splits in Amibroker data. I have downloaded your amibroker data(35Mb) and than updated it from Live nifty data as you suggested. Now the companies like reliace have gone split go the charts are ditorted. Please suggest.

  • Rajandran Rajarathinam said:

    @AnkushDone

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

Optionally add an image (JPEG only)