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:	127
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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X