Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

custom chart style error

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

    custom chart style error

    I copied and modified box chart style and saved it as a new chart style. I am unable to copy or save a window using this chart style. For example, when copying I get following error: What could be the issue?
    Click image for larger version

Name:	image.png
Views:	157
Size:	4.4 KB
ID:	1329465

    I am using custom ChartStyleType:

    protected override void OnStateChange()
    {
    if (State == State.SetDefaults)
    {
    Description = @"BoxedCandleStyleWithTrend5";
    Name = "BoxedCandleStyleWithTrend5";
    ChartStyleType = (ChartStyleType)1017;
    BarWidth = 1;

    NeutralBrush = System.Windows.Media.Brushes.Gray;
    Stroke = new Stroke(Brushes.Transparent, 1f);
    }
    else if (State == State.Configure)
    {
    Properties.Remove(Properties.Find("BarWidthUI", true));
    SetPropertyName("DownBrush", "Down Color");
    SetPropertyName("UpBrush", "Up Color");
    SetPropertyName("NeutralBrush", "Neutral Color");
    SetPropertyName("Stroke", "Outline Color");
    }
    }​

    #2
    Hello MiCe1999,

    I see Trend2 in the error message and Trend5 in the suggested code.

    Possibly a different script is causing the issue. Are you making multiple duplicates?

    Are these using ChartStyleType Ids?

    Are you referencing the wrong name in other lines of the code?
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    57 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    26 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    17 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    24 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    24 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X