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 Haiasi, 04-25-2024, 06:53 PM
        2 responses
        17 views
        0 likes
        Last Post Massinisa  
        Started by Creamers, Today, 05:32 AM
        0 responses
        5 views
        0 likes
        Last Post Creamers  
        Started by Segwin, 05-07-2018, 02:15 PM
        12 responses
        1,786 views
        0 likes
        Last Post Leafcutter  
        Started by poplagelu, Today, 05:00 AM
        0 responses
        3 views
        0 likes
        Last Post poplagelu  
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,408 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Working...
        X