![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Sep 2008
Posts: 289
Thanks: 0
Thanked 0 times in 0 posts
|
I am trying to create an indicator of an indicato and cant figure it out I followed the example of the SMA of Volume but would like help on the Wizzard.
Thanks |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
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.html
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Sep 2008
Posts: 289
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
|
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]; http://www.ninjatrader-support.com/H...iesObject.html
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Sep 2008
Posts: 289
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks,
Do you suggest a similar indicator I can use as a template for the NT code? |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
|
Hi designer,
Please check out the following thread, the indicator posted there should give a good starting point for what you want to do - http://www.ninjatrader-support2.com/...ead.php?t=3952
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Sep 2008
Posts: 289
Thanks: 0
Thanked 0 times in 0 posts
|
Would I be able to use the StochRSI code (attached)and just replace RSI with CCI in the code?
Thanks |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Mar 2008
Posts: 731
Thanks: 0
Thanked 1 time in 1 post
|
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.
|
|
|
|
|
|
#9 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
|
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:
minimum.Set( MIN(CCI(PeriodRsi), LookBack)[0]); maximum.Set( MAX(CCI(PeriodRsi), LookBack)[0]); rsi.Set( CCI(PeriodRsi)[0]);
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#10 |
|
Senior Member
Join Date: Sep 2008
Posts: 289
Thanks: 0
Thanked 0 times in 0 posts
|
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. Thanks |
|
|
|
|
|
#11 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Save this file in
My Documents\NinjaTrader 6.5\bin\Custom\Indicator Then in NT select, Tools > Edit NinjaScript > Indicator and select this indicator. Then compile it by pressing the F5 key in the Editor. Now this indicator will be available in NT.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#12 |
|
Senior Member
Join Date: Sep 2008
Posts: 289
Thanks: 0
Thanked 0 times in 0 posts
|
Ray thanks I did as sugested but get the following errors in lines 50-56
Error CS0103 Thanks |
|
|
|
|
|
#13 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
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=3418
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#14 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
|
Hi designer,
Please check out this debugged and commented code of the StocCCI and let me know if you have questions.
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Stochastics Overlay | NinjaTrader_Josh | NinjaScript File Sharing Discussion | 18 | 08-14-2009 01:42 PM |
| CCI Stochastics | designer | Indicator Development | 1 | 09-21-2008 02:24 PM |
| version 6 vs 6.5 stochastics different | rc5781 | Charting | 1 | 04-07-2008 07:54 PM |
| Applying Stochastics to SMA | jeremymgp | Indicator Development | 1 | 12-03-2007 11:37 PM |
| Stochastics vs Fast Stochastics Indicator | KBJ | Miscellaneous Support | 4 | 10-17-2007 04:44 PM |