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

new compiled indicator can't be called?

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

    new compiled indicator can't be called?

    Hi,

    I developed a new indicator for use within a strategy of mine. It is simply a modification of an older indicator. When I "call" the new indicator in my strategy I get a "The name (indicator name) does not exist in the current context" error. The new indicator compiles just fine, why can I not use it within my strategy??? This is very frustrating.

    here is how I'm calling the "new" indicator in my strategy (throws an error):

    if(Close[0] >= FiboBoll2(1.618, 1, 2.618, 1.27, 4.24, 0.5, 1, 8).Upper2[1]){do something}

    and the "old" (works fine):

    if(Close[0] >= FiboBoll(1.618, 2.618, 4.24, 1, 8).Upper2[1]){do something}

    thanks in advance.

    #2
    Hello Burga1,

    Where are you calling the indicator from? It should be in the strategies OnBarUpdate() method.

    It may help to use the intellisense command this. and then see if you can browse to your indicator.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hello and thank you.

      Yes it is within the strategy's OnBarUpdate() method. I simply want to replace the old instances of the old indicator and replace with the "new" one, what's the big deal?

      I don't understand how to use the Intellisense "this" command...

      Comment


        #4
        OK I think I got it now. That "this." command worked to somehow "find" my new indicator so I could use it after I figured out how the command worked, thanks aain...

        Comment


          #5
          Thanks for the update, burga1. Glad to hear you got it worked out.
          Ryan M.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by hazylizard, Today, 08:38 AM
          4 responses
          10 views
          0 likes
          Last Post hazylizard  
          Started by geddyisodin, Today, 05:20 AM
          2 responses
          18 views
          0 likes
          Last Post geddyisodin  
          Started by Max238, Today, 01:28 AM
          5 responses
          47 views
          0 likes
          Last Post Max238
          by Max238
           
          Started by giulyko00, Yesterday, 12:03 PM
          3 responses
          13 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by habeebft, Today, 07:27 AM
          1 response
          16 views
          0 likes
          Last Post NinjaTrader_ChristopherS  
          Working...
          X