Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in and Co-Creator of Algomojo (Algorithmic Trading Platform for DIY Traders)

Coppock, Nifty and Amibroker AFL code

1 min read

Coppock is one of my favorite bull market indicator. It helps investor to identify the start of the bull market. It helps investors to pick best stock to ride in any bull market.


[wp_ad_camp_5]

Here are the Formulas to calculate the Coppock indicator extracted from the incredible charts portal

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 the calculation. For a more timely signal, try substituting the daily equivalent in the place of monthly figures: 294 day ROC, 231 day ROC, and 210 days weighted moving averages. Based on these formulas I had coded for the Coppock value using 294,231,210 ROC values which suits the daily time frame. Here is the simple Coppock AFL code

For the 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 interesting reading about Coppock Indicator and its history from DNA India

Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in and Co-Creator of Algomojo (Algorithmic Trading Platform for DIY Traders)

Stoploss, Multi Target, and Trailing Stoploss Module – Amibroker…

After Intraday V2.0 Amibroker Module - a readymade drag and drop module to convert any trading strategy into the intraday trading system with alerts,...
Rajandran R
6 min read

Line Trading – Algomojo Automation Module for Amibroker Users

The line Trading Automation tool is designed for Manual traders who want to perform level-based trade execution faster and also bring some advanced trade...
Rajandran R
58 sec read

Plotting Day Wise Equity Curve using Amibroker

We know that Amibroker provides an equity curve for the whole strategy. Is there a way where we can build a simple Day Wise...
Rajandran R
1 min read

2 Replies to “Coppock, Nifty and Amibroker AFL code”

  1. 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.

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More