cheatcountry

Ehlers Adaptive Commodity Channel Index V1 [CC]

The Adaptive Commodity Channel Index V1 was created by John Ehlers (Rocket Science For Traders pgs 236-237) and this is the typical Commodity Channel formula with the introduction of adaptive lengths based on his earlier work with indicators such as the Mother of Adaptive Moving Averages. For longer term signals you would get a bullish signal when CCI is above 0 and a bearish signal when CCI falls below 0. For shorter term signals you would get a bullish signal when crosses over it's overbought level or when it crosses above it's oversold level or vice versa. I have included both signals to make it easier.

Let me know if you want a custom script written or if you have a special request for me
Release Notes: trying to fix an issue with the label location
Release Notes: fixed a typo
Release Notes: had to fix the issue again because the save didn't go through
Remove from Favorite Scripts Add to favorite indicators

Comments

Hi @cheatcountry , is it a bug, the scale it shown 0 to (near stock price range) on my pane, instead of -200 to 200 ?
+1 Reply
@MasBart, can you send me a pm with a screenshot so I can see what you are talking about?
+1 Reply
MasBart cheatcountry
@cheatcountry, pm sent
+1 Reply
wroclai cheatcountry
@cheatcountry, You have the buy/sell plotshapes plotting above/below bar. It looks fine within the $200 price range in your screenshot. If used on a instrument with a higher price like BTC, the oscillator looks squished because it is centered on 0 but the plotshapes are plotting around the 12000 price range.
+1 Reply
@wroclai, thanks for the info. I made a change that will fix that
+1 Reply
MasBart cheatcountry
@cheatcountry, it's fixed now. Thanks
+1 Reply
I just went through the script, some comments as below:

1. "period := im != 0 and re != 0 ? 360 / atan(im / re) : 0" , I understand "360 " here should be changed into "2*pi".

2. "period := im != 0 and re != 0 ? 360 / atan(im / re) : 0
period := min(max(period, 0.67 * nz(period)), 1.5 * nz(period))
period := min(max(period, 6), 50)
period := (0.2 * period) + (0.8 * nz(period))" , the order of 'period' assignment, i remember "min 1.5 * nz(period)" should be first handled. However, i am not sure whether it will contribute to different results or not.

3. "length = ceil(cycPart * smoothPeriod)", 'ceil' function here should be 'round', but when i changed it, pine reported an error of nagtive value. I have no idea why this happen.

could you look into them and check whether they are valid or not? thanks in advance!
Reply
thanks for sharing this, really appreciate :D
Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Private Messages Chat Sign Out