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 AttiM, 02-14-2024, 05:20 PM
          11 responses
          184 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by fernandobr, Today, 09:11 AM
          1 response
          3 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by timmbbo, Today, 08:59 AM
          1 response
          3 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by KennyK, 05-29-2017, 02:02 AM
          2 responses
          1,281 views
          0 likes
          Last Post marcus2300  
          Started by itrader46, Today, 09:04 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Working...
          X