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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    236 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    150 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    162 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    243 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    198 views
    0 likes
    Last Post CarlTrading  
    Working...
    X