Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom Dash?

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

    Custom Dash?

    Hi,

    We all know about the three default options in Ninja, but what if I wanted to assign a custom dash that has more spaces inbetween or use a different character for the dash?
    And what if I wanted to assign that custom dash as a 4th option which is selectable in the indicator settings?

    Just wanting to know what the options are with that, thank you very much in advance!

    #2
    Hello davydhnz,

    Are you referring to the Dash style for a plot?
    Unfortunately, these cannot be modified or added.

    You can, however, custom render anything you would like in OnRender().
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      Yes, I mean with draw.line if there was a way.

      I asked ChatGPT before you lol and it said to:

      Code:
      private enum DashStyleType { Solid = 0, Dash = 1, Dot = 2, Custom = 3 }
      [NinjaScriptProperty] [Display(ResourceType = typeof(Custom.Resource), Name = "Dash Style", GroupName = "Appearance", Order = 0)]
      public DashStyleType MyDashStyle { get; set; }
      private DashStyle customDashStyle; // Declare the custom DashStyle as a class-level variable
      Obviously that didn't work . It is good for some things, but clearly has certain limitations.

      I guess I'll have to put it on my longterm wishlist for when I finally get to learning OnRender.

      Thanks for your reply, regardless.
      David​

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      72 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      39 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X