Thanks
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Creating Stochastics of CCI
Collapse
X
-
Hi designer,
Thanks for the post. Please tell us at what step you run into trouble following the tutorial and we will gladly assist you. Here is the tutorial link - http://www.ninjatrader-support.com/H...verview22.htmlJosh P.NinjaTrader Customer Service
-
Hi Josh,
I am trying to create an indicator which is the Stochastics of the CCI. I was able to create all the parameters from the wizzard but when I get to the code portion i'm not sure where to insert the code from the CCI and the Stochastics. I guess I have to insert the CCI code...
Thanks
Comment
-
Hi designer,
First you will have to create a DataSeries object, because the Stochastics takes only a DataSeries input. In the Variables section add
Code:private new DataSeries cciValue;
Code:cciValue = new DataSeries(this);
Code:cciValue.Set(CCI(Close, MyPeriod)[0]);
Code:double stochCCI = Stochastics(cciValue, MyPeriodD, MyPeriodK, MySmoothingPeriod)[0];
BertrandNinjaTrader Customer Service
Comment
-
Hi designer,
Please check out the following thread, the indicator posted there should give a good starting point for what you want to do -
Originally posted by designer View PostThanks,
Do you suggest a similar indicator I can use as a template for the NT code?BertrandNinjaTrader Customer Service
Comment
-
Would I be able to use the StochRSI code (attached)and just replace RSI with CCI in the code?
ThanksAttached Files
Comment
-
I don't see why not. It should work fine. I have replaced RSI with CCI in indicators before and it was very simple and effective.
Comment
-
Hi,
Yes, this indicator can easily be modified to produce a Stochastic CCI.
Your minimum, maximum and rsi sets would then look like this -
Code:[FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]minimum.Set( MIN(CCI(PeriodRsi), LookBack)[[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]]);[/SIZE][/FONT] [SIZE=2][FONT=Courier New]maximum.Set( MAX(CCI(PeriodRsi), LookBack)[[/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]]);[/SIZE][/FONT] [SIZE=2][FONT=Courier New]rsi.Set( CCI(PeriodRsi)[[/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]]);[/SIZE][/FONT] [/SIZE][/FONT]
Originally posted by Elliott Wave View PostI don't see why not. It should work fine. I have replaced RSI with CCI in indicators before and it was very simple and effective.BertrandNinjaTrader Customer Service
Comment
-
Thanks,
I was able to paste your CCI code as shown below (see attachment) then i saved it but when I try to import the saved file into the chart i do not see it in the Indicators list...please check if i placed in the right location.
ThanksAttached Files
Comment
-
You would then have to debug the error, I would not know what the problem is since its not my code.
Here is a help resource that may provide some guidance - http://www.ninjatrader-support2.com/...ead.php?t=3418RayNinjaTrader Customer Service
Comment
-
Hi designer,
Please check out this debugged and commented code of the StocCCI and let me know if you have questions.
Originally posted by designer View PostRay thanks I did as sugested but get the following errors in lines 50-56
Error CS0103
ThanksAttached FilesBertrandNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by wzgy0920, 04-20-2024, 06:09 PM
|
2 responses
27 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:43 PM
|
||
Started by wzgy0920, 02-22-2024, 01:11 AM
|
5 responses
32 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:33 PM
|
||
Started by wzgy0920, 04-23-2024, 09:53 PM
|
2 responses
49 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:29 PM
|
||
Started by Kensonprib, 04-28-2021, 10:11 AM
|
5 responses
193 views
0 likes
|
Last Post
by Hasadafa
Yesterday, 10:19 PM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
11 responses
3,235 views
0 likes
|
Last Post Yesterday, 08:07 PM |
Comment