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 CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      220 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      135 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      150 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      235 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      193 views
      0 likes
      Last Post CarlTrading  
      Working...
      X