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 Haiasi, 04-25-2024, 06:53 PM
    2 responses
    16 views
    0 likes
    Last Post Massinisa  
    Started by Creamers, Today, 05:32 AM
    0 responses
    4 views
    0 likes
    Last Post Creamers  
    Started by Segwin, 05-07-2018, 02:15 PM
    12 responses
    1,786 views
    0 likes
    Last Post Leafcutter  
    Started by poplagelu, Today, 05:00 AM
    0 responses
    3 views
    0 likes
    Last Post poplagelu  
    Started by fx.practic, 10-15-2013, 12:53 AM
    5 responses
    5,407 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Working...
    X