Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to customize marketcenter columns

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

    how to customize marketcenter columns

    I copied the code from column notes and updated it to have my own crossabove value. I uupdated the description to my own custom column name NinjaTrader.Custom.Resource.NinjaScriptMarketAnaly zerColumnDescriptionCrossAbove;
    but it does not like it. how can I fix it?


    #region Using declarations
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Xml.Serialization;
    using NinjaTrader.Cbi;
    using NinjaTrader.Gui;
    using NinjaTrader.Gui.Chart;
    using NinjaTrader.Gui.SuperDom;
    using NinjaTrader.Data;
    using NinjaTrader.NinjaScript;
    using NinjaTrader.Core.FloatingPoint;

    #endregion

    //This namespace holds MarketAnalyzerColumns in this folder and is required. Do not change it.
    namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
    {
    public class CrossAbove : MarketAnalyzerColumn
    {

    protected override void OnStateChange()
    {if (State == State.SetDefaults)
    {
    Description = NinjaTrader.Custom.Resource.NinjaScriptMarketAnaly zerColumnDescriptionCrossAbove;
    Name = NinjaTrader.Custom.Resource.NinjaScriptMarketAnaly zerColumnNameCrossAbove;

    IsDataSeriesRequired = false;
    DataType = typeof(string);
    IsEditable = true;
    }
    else
    {
    }

    }


    protected override void OnMarketData(Data.MarketDataEventArgs marketDataUpdate)
    {
    int a;
    // if (marketDataUpdate.MarketDataType == MarketDataType.Ask )
    // {
    // Print(DateTime.Now + marketDataUpdate.Instrument.FullName + marketDataUpdate.Instrument.MasterInstrument.Forma tPrice(marketDataUpdate.Price) + "Crossed below ask" + mobject.ask );
    // }

    }
    }
    }

    #2
    Hello junkone,

    Thank you for your patience.

    The custom resources for the names are specific to the pre-loaded objects. You would instead use a string, such as "My Name" or "My Description".
    Code:
    {if (State == State.SetDefaults)
    {
    Description	= "My Description";
    Name	= "My Name";

    Comment


      #3
      how can I create my own preloaded objects?
      Originally posted by NinjaTrader_PatrickH View Post
      Hello junkone,

      Thank you for your patience.

      The custom resources for the names are specific to the pre-loaded objects. You would instead use a string, such as "My Name" or "My Description".
      Code:
      {if (State == State.SetDefaults)
      {
      Description	= "My Description";
      Name	= "My Name";

      Comment


        #4
        Hello junkone,

        Thank you for your response.

        In general, resources would be added through a project in Visual Studio: https://msdn.microsoft.com/en-us/lib...v=vs.100).aspx

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        670 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        379 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        582 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X