Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 futtrader, 04-21-2024, 01:50 AM
      4 responses
      41 views
      0 likes
      Last Post futtrader  
      Started by Option Whisperer, Today, 09:55 AM
      1 response
      11 views
      0 likes
      Last Post bltdavid  
      Started by port119, Today, 02:43 PM
      0 responses
      1 view
      0 likes
      Last Post port119
      by port119
       
      Started by Philippe56140, Today, 02:35 PM
      0 responses
      3 views
      0 likes
      Last Post Philippe56140  
      Started by 00nevest, Today, 02:27 PM
      0 responses
      2 views
      0 likes
      Last Post 00nevest  
      Working...
      X