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

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 mmckinnm, Today, 01:34 PM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Conceptzx, 10-11-2022, 06:38 AM
    3 responses
    60 views
    0 likes
    Last Post NinjaTrader_SeanH  
    Started by f.saeidi, Today, 01:32 PM
    1 response
    2 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by traderqz, Today, 12:06 AM
    9 responses
    16 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by kevinenergy, 02-17-2023, 12:42 PM
    117 responses
    2,766 views
    1 like
    Last Post jculp
    by jculp
     
    Working...
    X