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!
See more
See less

Partner 728x90

Collapse

Not able to access WoodiesCCI ; The name WoodiesCCI does not exist in the current context

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Not able to access WoodiesCCI ; The name WoodiesCCI does not exist in the current context

    Hello,

    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)[0];
    ...
    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 NT6.0.0.8.

    Can anyone help?

    Thank you.

    #2
    imported post

    Hi Obi,

    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] > 0)
    // Do something here


    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      Hi,

      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?

      SUGGESTION:
      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?

      Thank you.
      Obi

      Comment


        #4
        imported post

        Hi,

        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."


        Ray
        Attached Files
        RayNinjaTrader Customer Service

        Comment


          #5
          imported post

          Hi Ray,

          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.

          Thank you,

          Obi

          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 wzgy0920  
          Started by wzgy0920, 02-22-2024, 01:11 AM
          5 responses
          32 views
          0 likes
          Last Post wzgy0920  
          Started by wzgy0920, 04-23-2024, 09:53 PM
          2 responses
          49 views
          0 likes
          Last Post wzgy0920  
          Started by Kensonprib, 04-28-2021, 10:11 AM
          5 responses
          193 views
          0 likes
          Last Post Hasadafa  
          Started by GussJ, 03-04-2020, 03:11 PM
          11 responses
          3,235 views
          0 likes
          Last Post xiinteractive  
          Working...
          X