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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    152 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    87 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    131 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    127 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    106 views
    0 likes
    Last Post CarlTrading  
    Working...
    X