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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    44 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    54 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    34 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    95 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    57 views
    0 likes
    Last Post PaulMohn  
    Working...
    X