Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

problem with NS wrap ?

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

    problem with NS wrap ?

    Hi,
    I keep running into a problem when trying to save a custom indicator under a new name. It goes like this:
    I have a custom indicator that compiles and runs just fine, no problems. Then I create a new version and I do a "save as" to give it a different name. (In the new version I ensure that the new public class name matches the newly saved file name.)
    When compiling the new version, Ninja produces errors in the NinjaScript Generated code section, where it appears to be simultaneously using definitions from the old version, and thinking there are duplicates of the same definitions.

    Please see the example attached. You will see the error codes, with the problem lines in the NinjaScript Generated code section.
    The original file was a_LiveDelta0. The new version is a_LiveDelta_v2.

    Any suggestions what is going on here ?

    thanks,
    Peter.
    Attached Files

    #2
    Peter it is because you are defining your things in the public space. When you do this in the IndicatorBase it is accessible from any NinjaScript anywhere. This is why you are running into these conflicts because now that you have created a second one you essentially have two definitions.

    Try switching them to private or just renaming their function names. Why are you programming to the partial class also? Unfortunately this level of programming is going outside the scope of what we can support. Please try to work within the normal structure of indicators, inside the public Indicator class. The section of code you are viewing has a specific warning attached to it stating "This namespace holds all indicators and is required. Do not change it".
    Last edited by NinjaTrader_JoshP; 10-28-2008, 02:27 PM.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    566 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
    547 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