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

How to cycle or randomize my drawing templates?

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

    How to cycle or randomize my drawing templates?

    I have a bunch of trend channel templates with different colors that I created and I want to either cycle or randomize the color template that's used whenever I draw trend channels instead of always using the default template. I'm fairly certain it can be done by editing the code but I am an absolute beginner at coding and was looking for some tips. I am on NinjaTrader 8.

    Thanks

    #2
    Hello yuenster,

    Thank you for your post.

    If you would like to randomly select a Trend Channel drawing tool template or select a drawing tool template from a list of existing templates, you would need to use C# methods, such as Directory.GetFiles or Path.GetFileNameWithoutExtension, to get the list of the files in the folder Documents\NinjaTrader 8 \templates\DrawingTool\TrendChannel. Then you would read each file name to get the TrendChannel template name.

    Please note we do not provide C# programming education services in our Support department. That said, you may find the publicly available links below to be helpful.


    Returns the file name without the extension of a file path that is represented by a read-only character span.


    Let us know if we may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by RideMe, 04-07-2024, 04:54 PM
    5 responses
    28 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by f.saeidi, Today, 08:13 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by DavidHP, Today, 07:56 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by kujista, Today, 06:23 AM
    3 responses
    9 views
    0 likes
    Last Post kujista
    by kujista
     
    Started by Mindset, Yesterday, 02:04 AM
    2 responses
    18 views
    0 likes
    Last Post NinjaTrader_RyanS  
    Working...
    X