• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8b9 How to stop NT to generate wrapper for partial class IndicatorBase

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

    NT8b9 How to stop NT to generate wrapper for partial class IndicatorBase

    I want to split my custom indicator base into separate files using partial class:
    Code:
    
    public partial class myIndicatorBase : Indicator
    
    Unfortunately NT8 keeps generating the wrapper for both files causing compile error:
    "The type 'NinjaTrader.NinjaScript.Indicators.Indicator' already contains a definition for 'cachemyIndicatorBase'"

    Is there a way to stop NT8 from generating wrapper for specific file/namespace/class?
    If not is there any workaround for this issue?

    #2
    Place it in the AddOns folder instead.

    Comment


      #3
      Thanks! Can't try at the moment but looks like it will work (if NT generates wrapper based on the file location and not on the namespace as I naively assumed).

      This is also one more reason why adding other folders (like eg.: "Common") to the "Custom" project are so important - my AddOn folder already includes so much stuff unrelated to add ons that more appropriate name for it would be "Everything-Else-You-Have-No-Idea-Where-To-Put-Or-Cannot-Put-Anywhere-Else"

      Comment


        #4
        Hello gregid,

        wbennettjr is correct the and partial classes will need to be in the Addons folder.

        Please see the following thread below for an example of partial classes.
        http://ninjatrader.com/support/forum...980#post442980
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Johnny, Today, 11:42 AM
        0 responses
        4 views
        0 likes
        Last Post Johnny
        by Johnny
         
        Started by habibalex, Today, 09:03 AM
        2 responses
        10 views
        0 likes
        Last Post sledge
        by sledge
         
        Started by ptpatrader, Today, 11:38 AM
        2 responses
        13 views
        0 likes
        Last Post ptpatrader  
        Started by emuns, Today, 11:20 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by chartish, Today, 10:33 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Working...
        X