Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problems exporting indicator that calls another indicator

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

    Problems exporting indicator that calls another indicator

    I coded a ZigZag Indicator (called aaaZigZagUTCPivot) that makes calls to PriceActionSwingOscillator indicator to obtain certain parameters.
    The indicator compiles correctly, but for some reason I can not export it. I keep getting an error.

    I opened the log file and this is what I see:

    2017-01-30 21:27:22:882|2|4|Error compiling export assembly: c:\Users\user1\OneDrive\Documents\NinjaTrader 8\bin\Custom\Indicators\DAS\aaaZigZagUTCPivot.cs(2 2,7) : error CS0246: The type or namespace name 'PriceActionSwing' could not be found (are you missing a using directive or an assembly reference?)
    2017-01-30 21:27:22:882|2|4|Error compiling export assembly: c:\Users\user1\OneDrive\Documents\NinjaTrader 8\bin\Custom\Indicators\DAS\aaaZigZagUTCPivot.cs(9 6,15) : error CS0246: The type or namespace name 'SwingStyle' could not be found (are you missing a using directive or an assembly reference?)
    2017-01-30 21:27:22:882|2|4|Error compiling export assembly: c:\Users\user1\OneDrive\Documents\NinjaTrader 8\bin\Custom\Indicators\DAS\aaaZigZagUTCPivot.cs(1 39,17) : error CS0246: The type or namespace name 'SwingProperties' could not be found (are you missing a using directive or an assembly reference?)
    2017-01-30 21:27:22:882|2|4|Error compiling export assembly: c:\Users\user1\OneDrive\Documents\NinjaTrader 8\bin\Custom\Indicators\DAS\aaaZigZagUTCPivot.cs(1 43,17) : error CS0246: The type or namespace name 'SwingCurrent' could not be found (are you missing a using directive or an assembly reference?)
    2017-01-30 21:27:22:882|2|4|Error compiling export assembly: c:\Users\user1\OneDrive\Documents\NinjaTrader 8\bin\Custom\Indicators\DAS\aaaZigZagUTCPivot.cs(1 47,17) : error CS0246: The type or namespace name 'Swings' could not be found (are you missing a using directive or an assembly reference?)

    Any clues what is the problem? I was able to export the same indicator successfully on NT 7. Once I upgraded the code to NT 8 I can not export the code anymore.

    Thanks

    #2
    Hello ds1111,

    This could be due to how the PriceActionSwingOscillator is programmed, and also how you are referencing this item in your script.

    The names mentioned in the error look like they are potentially Enum's, generally if you are trying to export items that use Enums you have to also account for this with how you program the item.

    Without seeing the syntax used I could only speculate, but in general you would need to change the following items:

    At the top of the file where you are using the using statements, you would need to remove the using statement that is needed for the SwingStyle, SwingProperties, SwingCurrent, etc.. The namespace these are in would need to be removed from the using statements so the file no longer compiles. After doing this, you would need to change all usages to have the fully qualified name:

    Code:
    SomeNamespace.PriceActionSwingOscillator.SwingStyle.SomeSwingStyle
    If you can provide one of the usages and the namespace it comes from I could likely provide a more clear example, the main item to take away would be to remove the using statement and use the full namespace in the syntax you use like the above example.

    There could be other items in the indicator you are using that are preventing the export as well. To test you could create a dummy indicator with no logic as a test, ensure it exports and then add a call to the PriceActionSwingOscillator and try to export again. This would just allow you to find the correct syntax needed for exporting before you modify the larger real script, this could aid in the speed in which you can locate the problems.


    Additionally I see that you currently are using OneDrive or have the documents folder mapped to one drive, I just wanted to mention this as it is known to cause problems with the platform. If you have one drive turned on, you may want to disable it, In general any application that may use the files while NinjaTrader is using them would be considered bad as this can cause read/write problems in the platform.
    c:\Users\user1\OneDrive\Documents\


    I look forward to being of further assistance.
    Last edited by NinjaTrader_Jesse; 01-31-2017, 09:14 AM.

    Comment


      #3
      could you let me know how to use vlow and vhigh of thte priceswingoscillator ?
      i call them from another indicator and give me error

      if (PriceActionSwingOscillator(20, 7, PriceActionSwing.Base.SwingStyle.Ticks, false).VLow[0] > 0)
      {}

      Comment


        #4
        Hello,

        Thank you for the post.

        Can you provide the errors you are seeing? This would not be enough detail to know what specifically is wrong with the syntax you had provided.

        I look forward to being of further assistance.

        Comment


          #5
          At the end it works as
          if(PriceActionSwingOscillator(20,7,SwingStyle.Stan dard,false).VLow[0]>0 )

          i would like to thanks for your answer

          Comment


            #6
            at the end it works as
            if(PriceActionSwingOscillator(20,7,SwingStyle.Stan dard,false).VLow[0] >0)

            thancks a lot

            Comment


              #7
              it doesn work

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              571 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              330 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              548 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              548 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X