Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem with 'Type' in modified Code.

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

    Problem with 'Type' in modified Code.

    I' modifying a Script and I have an ENUM specified by,
    #region Enums
    public enum DALadderEnum
    {
    BidAsk,
    VolumeDelta
    }
    under PROPERTIES
    #region BID ASK LADDER PROPERTIES
    [NinjaScriptProperty]
    [Display(Name="LADDER Type", Description="Shows either BID/ASK VOLUME or DELTA/VOLUME", Order=1, GroupName = "3. DA LADDER Properties")]
    public DALadderEnum DALadderType
    {
    get { return DALadderType; }
    set { DALadderType = value; }
    }
    I just changed the name globally from xyz to DALadder.

    I get an error message:
    The type 'NinjaTrader.NinjaScript.Indicators.MyIndicators.M yDA_Ladder' already contains a definition for 'DALadderType'
    It's Friday afternoon, been a long day and I'm missing something obvious. Any thoughts on why I'm getting this. All swas well prior to a simple change.

    #2
    Hello dmking,

    Thanks for your post.

    The error message indicates that the indicator MyDA_Ladder already contains a definition for DALadderType. This means it is likely that DALadderType is being defined twice in your script.

    In the NinjaScript Editor, use CTRL + F to bring up the Find window and search for DALadderType to see where it is being defined in the script. If you see DALadderType being defined twice, rename or remove one of the instances of DALadderType.

    Let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Thanks Brandon,

      I'll take a look.

      Comment

      Latest Posts

      Collapse

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