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:
    [FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]
    [SIZE=2][FONT=Consolas][COLOR=#0000ff]public [/COLOR][/FONT][/SIZE][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]partial [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff][FONT=Consolas][SIZE=2][COLOR=#0000ff]class[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][COLOR=#000000] my[/COLOR][/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]IndicatorBase[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Consolas][SIZE=2][FONT=Consolas][SIZE=2][COLOR=#000000] : [/COLOR][/SIZE][/FONT][/SIZE][/FONT][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af][FONT=Consolas][SIZE=2][COLOR=#2b91af]Indicator[/COLOR][/SIZE][/FONT]
    [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
    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 alexstox, 10-16-2018, 03:29 PM
        11 responses
        344 views
        0 likes
        Last Post aligator  
        Started by ageeholdings, 05-01-2024, 05:22 AM
        6 responses
        44 views
        0 likes
        Last Post ageeholdings  
        Started by tony_28217, Today, 07:04 PM
        0 responses
        11 views
        0 likes
        Last Post tony_28217  
        Started by flybuzz, Today, 10:33 AM
        1 response
        9 views
        0 likes
        Last Post flybuzz
        by flybuzz
         
        Started by spencerp92, 10-10-2023, 09:56 AM
        4 responses
        312 views
        0 likes
        Last Post flybuzz
        by flybuzz
         
        Working...
        X