Thanks
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!
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
NinjaTrader
How to cycle or randomize my drawing templates?
Collapse
X
-
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 -
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
- Likes 1
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by wzgy0920, Yesterday, 09:53 PM
|
2 responses
49 views
0 likes
|
Last Post
by wzgy0920
Today, 10:29 PM
|
||
Started by Kensonprib, 04-28-2021, 10:11 AM
|
5 responses
191 views
0 likes
|
Last Post
by Hasadafa
Today, 10:19 PM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
11 responses
3,230 views
0 likes
|
Last Post Today, 08:07 PM | ||
Started by andrewtrades, Today, 04:57 PM
|
1 response
14 views
0 likes
|
Last Post Today, 05:02 PM | ||
Started by chbruno, Today, 04:10 PM
|
0 responses
7 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
Comment