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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    150 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    303 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    243 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    345 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    174 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X