Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Parameters in Strategies

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

    Parameters in Strategies

    Hi,

    I am coding a strategy that uses multiple indicators. Unfortunately, 2 of those indicators have the same ENUM name for MA type which I need as inputs in the PARAMETERS section. I get this error:

    2011-07-26 18:56:13:011 Failed to execute DB job 'StrategyUpdateJob': There was an error reflecting type 'NinjaTrader.Strategy.GHPRPMMIKIE01'.: There was an error reflecting property 'TSIMA1Type'.: There was an error reflecting type 'NinjaTrader.Indicator.Tsi4JeffFromTMFT.DMAType'.: Types 'NinjaTrader.Indicator.Tsi4JeffFromTMFT.DMAType' and 'NinjaTrader.Indicator.DoubleMANT7v3.DMAType' both use the XML type name, 'DMAType', from namespace ''. Use XML attributes to specify a unique XML name and/or namespace for the type.

    Here are a few of the Params:

    [Description("")]
    [GridCategory("FTZ")]
    public NinjaTrader.Indicator.DoubleMANT7v3.DMAType MA2Type
    {
    get { return m_FTZ_ma2Type; }
    set { m_FTZ_ma2Type = value; }
    }
    [Description("")]
    [GridCategory("TSI")]
    public NinjaTrader.Indicator.Tsi4JeffFromTMFT.DMAType TSIMA2Type
    {
    get { return m_TSI_ma2Type; }
    set { m_TSI_ma2Type = value; }
    }

    I am trying to guess at a [Name()] type parameter to change one of the DMAType XML references within NT7. Do you have a full list of the [] parameter settings?

    Thanks,

    #2
    NJA_MC, can you try adding the XMLIgnore to your properties then for the strategy? Would that help work around the .NET XML issues seen?

    Comment


      #3
      Hi Bertrand,

      Adding this tag did help:
      [XmlIgnore()]

      Thanks. Is this a C# feature or an NT feature. I don't seem to be able to find a list of these type of commands, parameters.

      Comment


        #4
        NJA_MC, this is more of a general C# topic than NT feature.
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        118 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        166 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        85 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        130 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        88 views
        0 likes
        Last Post PaulMohn  
        Working...
        X