Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ninjatrader 8 superdom modifier

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

    ninjatrader 8 superdom modifier

    hi,
    can anyone here help me with this code i am getting CS0246 error.
    error -
    CustomSuperDOMColor.cs The type or namespace name 'Indicator' could not be found (are you missing a using directive or an assembly reference?) CS0246 29 36


    this is the code -

    using System.Windows.Media;
    using NinjaTrader.Cbi;
    using NinjaTrader.NinjaScript;

    public class CustomSuperDOMColor : Indicator
    {
    protected override void OnMarketDepth(MarketDepthEventArgs e)
    {
    foreach (var entry in e.MarketDepth.BidEntries)
    {
    if (entry.Quantity > 300)
    {
    SuperDOM.BidColor = Brushes.Purple;
    break; // Exit loop after first occurrence to avoid unnecessary processing
    }
    }

    foreach (var entry in e.MarketDepth.AskEntries)
    {
    if (entry.Quantity > 300)
    {
    SuperDOM.AskColor = Brushes.Purple;
    break; // Exit loop after first occurrence to avoid unnecessary processing
    }
    }
    }
    }
    Last edited by Devil118; 06-30-2024, 11:23 AM.

    #2
    Hello Devil118,

    This script is not in a namespace and has missing using statements.

    I recommend that you create a new indicator from the NinjaScript Editor and copy this logic into it.
    The new indicator will have the proper using statements, namespace path, and structure for an indicator.

    I've also providing a link to an example indicator that addons buttons to the WPF of the SuperDOM you may find helpful.
    ​​​​​​​https://ninjatraderecosystem.com/use...ons-indicator/
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X