Easylanguage Price Series Provider for Commodity Channel Index (CCI) - futures io

# Discussion in EasyLanguage Programming

Updated by ABCTG
1. trending_up 1,164 views
2. thumb_up 2 thanks given
3. group 2 followers
1. forum 5 replies
2. attach_file 1 attachments

 Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
 Genuine reviews from real traders, not fake reviews from stealth vendors Quality education from leading professional traders We are a friendly, helpful, and positive community We do not tolerate rude behavior, trolling, or vendors advertising in posts We are here to help, just let us know what you need You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple. -- Big Mike, Site Administrator (If you already have an account, login at the top of the page)

# Easylanguage Price Series Provider for Commodity Channel Index (CCI)

 (login for full post details) #1 (permalink) Lakeville     Posts: 6 since Dec 2017 Thanks: 1 given, 1 received Evening All. First and foremost, I appreciate all that look and provide their thoughts/opinions. I'm trying to convert the Easylanguage Commodity Channel Index (CCI) to be used with a Price Series Provider. I've read a handful of articles on how it's actually calculated: below is from tradingview . com / wiki / Commodity_Channel_Index_(CCI) "There are several steps involved in calculating the Commodity Channel Index. The following example is for a typical 20 Period CCI: CCI = (Typical Price - 20 Period SMA of TP) / (.015 x Mean Deviation) Typical Price (TP) = (High + Low + Close)/3 Constant = .015 The Constant is set at .015 for scaling purposes. By including the constant, the majority of CCI values will fall within the 100 to -100 range. There are three steps to calculating the Mean Deviation. 1. Subtract the most recent 20 Period Simple Moving from each typical price (TP) for the Period. 2. Sum these numbers strictly using absolute values. 3. Divide the value generated in step 3 by the total number of Periods (20 in this case). Where i'm currently at is here: variables: TP (0), AvgFC( 0 ), CCIValue( 0 ) ; TP = (PSP.Low[0] + PSP.High[0] + PSP.Close[0])/3; TPlast = TP; AvgFC = AverageFC( psp.close, 14 ); CCIValue = (TP - AvgFC) / (.015 * 14) ; When plotting the CCIValue that i have created, it mirrors exactly, the line part only, of the standard CCI on all time frames. what differs is the actual values. for example, the standard CCI would show a value of say -174.99 while my CCIValue would show -3.89 at the 13:00 time in the attachment. Where i'm stuck (meaning i don't understand how to write it) is on Steps 1 & 2 from what I listed above: 1. Subtract the most recent 20 Period Simple Moving from each typical price (TP) for the Period. 2. Sum these numbers strictly using absolute values. Would someone mind assisting me in filling in my shortcomings here? Thank you. DG Attached Thumbnails

Can you help answer these questions
from other members on futures io?
 Horizontal Line IndicatorPlatforms and Indicators Evening session tradingNinjaTrader DLL with webrequest function for MCMultiCharts Times and Sales more data to be displayedTradeStation T​​​​​​radestation datafeed (real time and historical) to NT8NinjaTrader

 Best Threads (Most Thanked)in the last 7 days on futures io

 (login for full post details) #3 (permalink) Vendor: www.abctradinggroup.com  Hamburg Germany   Experience: Advanced Platform: Multicharts, Tradestation Broker: DTN IQ Trading: ES   Posts: 2,192 since Apr 2013 Thanks: 385 given, 1,427 received DirtyGoats, I would suggest checking out the values you get using the AverageFC function with your PSP input. This might not work due to the "Limitations of PriceSeriesProviders" and averaging the values within your code might be the way to go. Regards, ABCTG
 The following user says Thank You to ABCTG for this post:

 (login for full post details) #4 (permalink) Lakeville     Posts: 6 since Dec 2017 Thanks: 1 given, 1 received i appreciate the response...and that's what i ended up doing. So thank you for that guidance. The next piece to my puzzle is getting the Price Series Provider to function based off of the 24hr & Pre/Post market data. currently i can only get my coding to function when im set on "Regular Session". if i flip to a 24hr (or Pre/Post) my data turns to a flat line. any recommendations there? thank you. DG

 (login for full post details) #5 (permalink) Lakeville     Posts: 6 since Dec 2017 Thanks: 1 given, 1 received nevermind...just found it: PriceSeriesProvide1.SessionName = "24 Hour";
 The following user says Thank You to DirtyGoats for this post:

Hamburg Germany

Broker: DTN IQ

Posts: 2,192 since Apr 2013

DirtyGoats,

thank you for the update.

Regards,

ABCTG

DirtyGoats
 nevermind...just found it: PriceSeriesProvide1.SessionName = "24 Hour";

 futures io > Easylanguage Price Series Provider for Commodity Channel Index (CCI)

June 5, 2018

 Upcoming Webinars and Events Become an Elite Member

 Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io All information is for educational use only and is not investment advice.There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts