Announcement

Collapse
No announcement yet.

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.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    639 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    366 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    107 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    569 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    572 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X