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

Error compiling export... The name 'Bollinger' does not exist in the current context.

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

    Error compiling export... The name 'Bollinger' does not exist in the current context.

    Riddle me this Batman...

    How is it that my NinjaScript Strategy compiles and runs fine with the Bollinger indicator called for both charting
    Add (Bollinger(numDev, entChann));

    ... and for variable assignment for use in the model...
    ChannUpper = Bollinger(numDev, entChann).Upper[0];

    Yet the Strategy gives me the titled error when I attempt to export?

    Last time I came across this I created my own indicator using the Script out of the "Bollinger" indicator which I subsequently modified... but this time I'm not looking to modify it, so it just seems silly for me to create a "BollingerToo" indicator when the the predefined one works perfectly fine for everything except Export.

    I've replicated this same issue on two machines with different strategies over recent months. I just couldn't be stuffed reporting it until now.

    Anyway, it's not critical but you may want to fix it for v8.0.

    Cheers,

    #2
    Hello Aspirant,

    Are you including the Bolliger Indicator when you export your strategy so that your Strategy and the "@Bollinger" is on the right panel as well?

    Happy to be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      Hi JC,

      That works, but with all my other Strategies NT automatically picks up the indicators I'm using and exports them automatically. What's odd is that NT doesn't do that with @Bollinger.

      What I find more curious is if I create a Custom Indicator "BollingerToo" and use that in my strategies I DON'T have to explicitly Export it, NT goes "oh, you're using BollingerToo... I'll Export that for you as well."

      Hence, "riddle me this Batman?" ... Why does NT not do an implicit Export of Bollinger only an explicit?

      I'll leave it with you. Thank again.

      Comment


        #4
        Hello,

        This is a known issue and is a limitation in referencing the nested scripts. For the most part as you pointed out your indicators will automatically be added but in some cases when you're thrown an error in the log about a specific indicator you will manually need to add it.
        LanceNinjaTrader Customer Service

        Comment


          #5
          Yep, we're on the same page.
          Yes, I noted @Bollinger is a nested script, but then so is my BollingerToo custom script which works as an implicit export.
          Like I said, I'll leave it with you. Maybe something to sort for NT8.
          Cheers,

          Comment


            #6
            just came about the same exporting problem. Great that explicit inclusion of Bollinger works, but really would like the riddle to be solved?

            Marco

            Comment


              #7
              Hello,

              Can you please clarify what is not working for you?

              When exporting a script some references have to be manually exported. If they are not included an error is thrown and reported in the log tab of the control center which will notify of which script you need.
              LanceNinjaTrader Customer Service

              Comment


                #8
                Hi Lance,

                I think it's the same thing as for Aspirant. I coded a strategy that calls @Bollinger in Initialize and OnBarUpdate. It compiles without errors. When I tried to export it NT gives me the titled log error: Error compiling export... The name 'Bollinger' does not exist in the current context.

                If I explicitly include @Bollinger in the export I get no errors.

                So I'm fine and my problem is solved, I just wanted to understand what causes this error, because I have exported strategies that have @Bollinger as well without problems.

                Comment


                  #9
                  Unfortunately I don't have a more specific answer than it has to do with .net referencing

                  I will forward your request to development but for now you will have to manually include the script.
                  LanceNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by bmartz, 03-12-2024, 06:12 AM
                  4 responses
                  31 views
                  0 likes
                  Last Post bmartz
                  by bmartz
                   
                  Started by Aviram Y, Today, 05:29 AM
                  4 responses
                  12 views
                  0 likes
                  Last Post Aviram Y  
                  Started by algospoke, 04-17-2024, 06:40 PM
                  3 responses
                  28 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by gentlebenthebear, Today, 01:30 AM
                  1 response
                  8 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by cls71, Today, 04:45 AM
                  1 response
                  7 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Working...
                  X