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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    128 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    73 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    116 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    109 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    88 views
    0 likes
    Last Post CarlTrading  
    Working...
    X