Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawRegion Compiles but Won't Export

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

    DrawRegion Compiles but Won't Export

    If I use the following code in an indicator

    DrawRegion("tag1", CurrentBar, 0, Bollinger(0.9,12).Upper, Bollinger(0.9,12).Lower, Color.Empty, colorShading, 2);

    the code will work but I will get an error when I try to export the indicator.

    If however, I copy the code from the Bollinger indicator, and in the DrawRegion use the data series in my indicator the following code will both work and export.

    double smaValue = SMA(Period)[0];
    double stdDevValue = StdDev(Period)[0];
    Upper.Set(smaValue + NumStdDev * stdDevValue);
    Middle.Set(smaValue);
    Lower.Set(smaValue - NumStdDev * stdDevValue);
    DrawRegion("tag1", CurrentBar, 0, Upper, Lower, Color.Empty, colorShading, 2);

    Why will the first example work but not export?
    Last edited by dkrumholz; 09-13-2010, 08:19 AM.

    #2
    Hello dkrumholz,

    Thank you for your post.

    What is the error message you're getting when exporting? Check log tab of control center.

    What version are you using? Check with Help > About.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Version 7.0.0.21

      Here are the log file lines

      09/12/2010 11:59:28 AM|2|4|Error compiling export sources: c:\Documents and Settings\dkrumholz.STRAND\My Documents\NinjaTrader 7\bin\Custom\Indicator\PMA_BBZone.cs(71,38) : error CS0103: The name 'Bollinger' does not exist in the current context
      09/12/2010 11:59:28 AM|2|4|Error compiling export sources: c:\Documents and Settings\dkrumholz.STRAND\My Documents\NinjaTrader 7\bin\Custom\Indicator\PMA_BBZone.cs(71,64) : error CS0103: The name 'Bollinger' does not exist in the current context
      09/12/2010 11:59:28 AM|2|4|See Help Guide section 'Export Problems' (http://www.ninjatrader-support.com/H...tProblems.html) for additional instructions

      Note again that the code compiles and runs even though it won't export.

      Comment


        #4
        Thanks for the error message. To export you will have to manually include the system indicator Bollinger.

        Let us know if you are still unable to export after manually including this file.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Yes including that file corrects the export.

          Shouldn't the export have known to grab that file automatically?

          Comment


            #6
            Most of the time it will pick up all needed indicators and prompt if you want to include. There are some PC setups where this is not always picked up and you will have to manually add any needed system indicators.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by pecunianonolet, 11-28-2016, 03:34 AM
            5 responses
            4,510 views
            0 likes
            Last Post Futurestrader00  
            Started by reynoldsn, Today, 07:23 AM
            4 responses
            9 views
            1 like
            Last Post reynoldsn  
            Started by bee1943, Today, 09:55 AM
            1 response
            13 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by FAQtrader, 04-25-2024, 12:00 PM
            7 responses
            103 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by giulyko00, Yesterday, 11:49 AM
            4 responses
            28 views
            0 likes
            Last Post giulyko00  
            Working...
            X