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