View Full Version : Not able to access WoodiesCCI ; The name WoodiesCCI does not exist in the current context
First timer trying to build a strategy based on WoodiesCCI indicator.
In the strategy code, under the OnBarUpdate() method, I did the following:
double shortCCI = WoodiesCCI(14);
if shortCCI > 0
When compiling this code, I get the following error:
"'The name 'WoodiesCCI' does not exist in the current context"
I'm using NT184.108.40.206.
Can anyone help?
03-22-2007, 10:03 AM
Welcome to the word of trading system development. A few things:
1) Please update to Beta 9 -
2) There is a bit of a workaround to access Woodies indicators. Please refer to the posting here for instructions - http://ninjatrader.mywowbb.com/forum14/1749.html
3) Once you have done the above, within your strategy, right click and select Insert Condition. You can play around with creating conditions and seing how the show up as code. For example, Woodies should be written like:
if (WoodiesCCI(2, 5, 14, 34, 25, 6, 60, 100, 2) > 0)
// Do something here
Thank you for your reply, I did as suggested and it does work; I now have access to WoodiesCCI.
However, there are 3 things I'm having troubles with:
1. When I open a chart and try to load the strategy on the chart by right-mouse clicking and selecting 'Strategies', clicking the 'Apply" button and "OK" after having select my newly created strategy, nothing appears on the chart.
The only time I see the result of my strategy is in the 'Strategy Analyzer', after selecting "Backtest".
The question here is, how do I apply the strategy to a RT (real-time) chart?
2. As an exercise, I created a sample Indicator using the same logic as in the strategy (with WoodiesCCI). This time however, my newly created indicator does not even appear on the list of available indicators.
Any idea why? How do I apply a self-created indicator in a RT chart?
3a. What are the parameters in:
WoodiesCCI(2, 5, 14, 34, 25, 6, 60, 100, 2)
3b. How can I check/test on particular values of the
Sidewinder or ChopZone, etc?
Many modern IDEs (Integrated Development Environment) have a functionality where after typing a class name and a dot, the list of available methods within the class (together with their complete syntax, including return values) appear in a drop-down list, after a short delay.
Is it possible to have something similar in the Indicator/Strategy editor?
03-25-2007, 04:48 AM
1. Please check the log tab of the Control Center window, any error messages when applying the strategy to a real-time chart? If not, then I you will need to debug why your strategy is not generating signals. By your description, it sounds like you have figured out how to apply a strategy on a real-time chart. To debug, you will have to add Print() statements in your strategy.
2. Once you compile your indicator, it will be available in the indicator list via right mouse click in the chart and select the "Indicators" menu. To compile, from NT select Tools > Edit NinjaScript, select your custom indicator, this will bring up the editor, press F5.
3a) Unzip the attached file into My Documents\NinjaTrader 6\bin\Custom and compile any indicator as per step 2 above. You can then open up your strategy, type this.Wo... and you should see the WoodiesCCI indicator, once you type "(" after this.WoodieCCI" you will see the method overload providing information on each parameter.
3b) Not supported currently but on our list.
Suggestion: Our Editor already supports this. Just type "this."
Yes, the indicator is now working and showing on a RT chart. Thank you.
I thought I knew how to apply the strategy on a chart, but I'm not so sure anymore.
Anyway, I'm happy to concentrate on the indicators for the time being.