I have been trying to create a "commodity channel index" block
and having trouble with the "counter" and length variables, and perhaps more.
This may be a little beyond my capabilities at this time.
If anyone has already constructed this indicator in blox and is willing to share it, I'd appreciate it?
Creating a commodity channel index in blox
-
Roger Rines
- Roundtable Knight

- Posts: 2038
- Joined: Wed Oct 06, 2004 10:52 am
- Location: San Marcos, CA
Creating a Blox for the CCI indicator shouldn't be much of an effort. However, when you are new to a program I find some projects are easier to accomplish when you look at how other indicators were created.
If you have not poked around in the Blox MarketPlace forum for some ideas, that would be were I would go next. For example if you go poking around in that forum section, you might find this Blox: Hull Moving Average Function
That Blox should teach you what you need to know about dealing with the FOR loop you'll need for the CCI function.
If after you've looked at that Blox and hopefully others as well, and you still don't get there, consider posting what you've accomplished in the Trading Blox Support section, However, if Tim gets this posting moved there before you need help on whatever remaining items you'll need help, just keep posting in this thread to keep the pieces together.
Don't worry, you'll get there, if you don't give up. This is an easy indicator to create.
If you have not poked around in the Blox MarketPlace forum for some ideas, that would be were I would go next. For example if you go poking around in that forum section, you might find this Blox: Hull Moving Average Function
That Blox should teach you what you need to know about dealing with the FOR loop you'll need for the CCI function.
If after you've looked at that Blox and hopefully others as well, and you still don't get there, consider posting what you've accomplished in the Trading Blox Support section, However, if Tim gets this posting moved there before you need help on whatever remaining items you'll need help, just keep posting in this thread to keep the pieces together.
Don't worry, you'll get there, if you don't give up. This is an easy indicator to create.
-
Roger Rines
- Roundtable Knight

- Posts: 2038
- Joined: Wed Oct 06, 2004 10:52 am
- Location: San Marcos, CA
-
Tim Arnold
- Site Admin

- Posts: 9024
- Joined: Tue Apr 06, 2004 1:41 pm
- Location: Boston, MA
- Contact:
Here is a quick sample block that plots the CCI Index. The parameters are the number of bars to use for the CCI, as well as the CCI Constant.
You can drop this in any system, and the CCI will plot on the trade chart. To use the cci indicator in your entry/exit block, just define an external series variable called "cci" and it will be available to access and use.
You can drop this in any system, and the CCI will plot on the trade chart. To use the cci indicator in your entry/exit block, just define an external series variable called "cci" and it will be available to access and use.
- Attachments
-
- plot cci.tbx
- (5.97 KiB) Downloaded 658 times
-
Roger Rines
- Roundtable Knight

- Posts: 2038
- Joined: Wed Oct 06, 2004 10:52 am
- Location: San Marcos, CA
