View Full Version : MA of CCI
brutusdog
01-18-2008, 03:23 AM
hi 1st post here and a NT newbie, just getting to grips with the platform and importing indicators, thanks for all those who have posted them:)
i am trying to make a moving average of cci. i want to plot this in the cci window and make the cci invisible.
has anyone done this, or is some one able to assist me in doing it as im pretty stuffed without it:confused:
many thanks in advance.
bd.
NinjaTrader_Josh
01-18-2008, 03:40 AM
You will need to custom code this as a new indicator. To do so you would pass in the CCI's DataSeries into your moving average instead of the usual price DataSeries.
File->Utilities->Import NinjaScript
brutusdog
01-18-2008, 03:53 AM
You will need to custom code this as a new indicator. To do so you would pass in the CCI's DataSeries into your moving average instead of the usual price DataSeries.
File->Utilities->Import NinjaScript
thank you josh, not sure i fully get it but will try!
going one step further i will need to plot several ma's of several cci settings
eg
cci 6 and ma
cci 18 and ma
cci 30 and ma
cci 60 and ma.......
your help is much appreciated THANK YOU.
bd.
NinjaTrader_Josh
01-18-2008, 03:57 AM
Unfortunately I cannot provide further custom coding support. The indicator I attached in my previous post will act as a guideline as to how you can program it to achieve what you want.
A simple solution that requires no programming to achieve multiple plots is just to load the same indicator 4-5 times, each time with different parameter settings. Place all the indicators on Panel 2 and they will overlay each other nicely.
brutusdog
01-18-2008, 08:21 AM
Unfortunately I cannot provide further custom coding support. The indicator I attached in my previous post will act as a guideline as to how you can program it to achieve what you want.
A simple solution that requires no programming to achieve multiple plots is just to load the same indicator 4-5 times, each time with different parameter settings. Place all the indicators on Panel 2 and they will overlay each other nicely.
thank you thats great overlay will do the job perfectly.
dwalls
01-30-2008, 10:08 AM
Josh,
I'm looking to make this CCIMA a Multi Colored MA, like your SampleMultiColoredPlot: http://www.ninjatrader-support.com/vb/showthread.php?t=3227
I might even like to use an EMA instead.
I tried to merge the two but couldn't get it to compile.
Could you help please.
Thanks
NinjaTrader_Ray
01-30-2008, 10:12 AM
Maybe this will help -
http://www.ninjatrader-support.com/vb/showthread.php?t=4678
dwalls
02-14-2008, 12:52 PM
Hello,
I'm still trying to make the CCIEMA change colors like the normal multi colored EMA or SMA
I tried to marry the CCIEMA and the EMA_Multicolored and got it to compile but it doesnt plot correctly. I think it might be a simple fix...I just cant figure out how to fix it.
Any help would be great.
Please take a look.
I also attach a chart. Look at the bottom of chart. It doesnt match the with the CCIEMA (20,14) above.
Thanks
NinjaTrader_Josh
02-14-2008, 11:43 PM
On the lines going like this:
RisingPlot.Set(1, EMA(Period)[1]);
You want to change EMA(Period) to your new plot so put in MA instead of EMA. Do this for RisingPlot, FallingPlot, and NeutralPlot.
dwalls
02-15-2008, 09:44 AM
// Plot green if the EMA is rising
// Rising() returns true when the current value is greater than the value of the previous bar.
else if (Rising(EMA(Period)))
{
// Connects the rising plot segment with the other plots
RisingPlot.Set(1, MA(Period)[1]);
// Adds the new rising plot line segment to the line
RisingPlot.Set(EMA(Period)[0]);
}
Thanks Josh,
I changed the EMA to MA and get this error message so it won't compile:
Indicator\CCIEMA_MultiColored.cs 'NinjaTrader.Indicator.CCIEMA_MultiColored.MA' is a 'property' but is used like a 'method' CS0118 - click for info 57 23
dwalls
02-15-2008, 09:53 AM
also in the thumbnail below...the red line on the CCIEMA_MultiColored Indicator appears to be based on price (708.34) and the green lines is based of the indicator (-74.29)...maybe this helps some how
Thanks
NinjaTrader_Josh
02-16-2008, 02:33 AM
dwalls,
Please review the help file for DataSeries. You need MA to be a DataSeries and you need to replace all instances of EMA with your MA wherever you are setting a plot value. Unfortunately due to bandwidth issues I cannot provide much more feedback, but hopefully that will get you in the right direction.