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
NinjaScript editor #region un-collapsing.
Collapse
X
-
NinjaScript editor #region un-collapsing.
Is there a way to stop the Ninjascript editor un-collapsing my code #region(s) and functions every time the script is compiled. This is very annoying and a time waster. It also defeats the purpose of #region i.e. hiding code not being worked on to make getting around the code easier.Last edited by seahn; 02-22-2017, 11:46 AM.Tags: None
-
Hello seahn,
Thank you for your note.
What version of NinjaTrader are you currently running?
The regions would be expected to collapse upon compiling your code. I have tested this and my regions are collapsing upon compile. However, the body of your code is expected to expand after compiling. Are you finding that your regions specifically are expanding and not collapsing or do you mean something else?
If it is just the regions that are expanding then we would want to take a look at the code itself and attempt to reproduce. If you could attach the .cs file to an email to platformsupport[AT]ninjatrader[DOT]com with "ATTN CHRIS S" in the subject line, I will be happy to look into this further.
Thank you and I look forward to your reply.
-
I am using NT8.
The regions and functions in my code which I manually collapse seem to randomly expand after compilation I cannot seem to reproduce it consistently, sometimes just one or two regions get expanded other times every function in the script gets expanded. As you can imagine it is very frustrating in a large script to have all the code I have just spent minutes collapsing because I am not working on it be expanded again when I recompile.
But the point is the collapsed/expanded state of any text should not be affected by compilation that is how all editors I have used behave such as Visual Studio.Last edited by seahn; 02-22-2017, 09:34 PM.
Comment
-
Hello seahn,
Under Control Center>Help>About, next to version, what is the number you see? For example, 8.0.2.0.
I look forward to your reply.Last edited by NinjaTrader_AlanP; 02-24-2017, 02:21 PM.Alan P.NinjaTrader Customer Service
Comment
-
Hello,
Thank you for your note.
Without the full code we're unable to test on our end.
If you'd like to upload the full code I can take a look and see if anything jumps out. Or if you'd prefer to email a copy, send to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread, and the files.
I look forward to your reply.Alan P.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_AlanP View PostWithout the full code we're unable to test on our end.
Was a lot worse early on.. but the problem being described here, is the same as my comment from late 2015 in the above thread.. This has been a long standing problem with working in NT8's editor, and remains to be a major pain..
Comment
-
Originally posted by -=Edge=- View PostThis has been an ongoing problem since early in the beta cycle..
At this point I kind of feel like I am just getting the run around on the issue, it happens regularly for me with all types of scripts yet they "cannot reproduce the problem". I doubt NT will do anything about this since the editor is 3rd party software I believe.
I am working around the issue by using the Visual Studio link in the NT8 script editor. I can do all my editing in VS then save the file (Ctrl-S). The NT8 editor sees the code has changed and automatically compiles the script. Its pretty seamless, I just minimize the NT8 editor and forget about it.
Anyone that wants to edit with Visual Studio if you do not have it Microsoft has Visual Studio Community Edition which is free just Google it. Just be sure you do not compile in VS and do not save the solution when done.
Comment
-
I was able to get rid of most instances of this issue by going thru my code
and making sure that I did not have double // // comment slashes on any one line.
However in some regions I was unable to fix the region collapse based on this theory albeit
it did fix most.
Comment
-
Originally posted by NinjaTrader_AlanP View PostWithout the full code we're unable to test on our end.
1st thing to notice is that regions don't work at all unless they encompasses the entire method. Notice because the OnStateChange region is inside the override method but the endregion is not.. It doesn't even recognize it as a region..
Now left click on line 122 or 123 in the editor and delete it..
or tab the endregion line 55 over 1...
or I could come up with other scenarios of inserting lines of code.. that will....
Immediately expand all regions...
Attached Files
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by janio973, Today, 07:24 PM
|
1 response
6 views
0 likes
|
Last Post Today, 07:35 PM | ||
Started by aligator, 01-06-2022, 12:14 PM
|
4 responses
238 views
0 likes
|
Last Post
by john_44573
Today, 06:11 PM
|
||
Started by reynoldsn, Today, 05:56 PM
|
0 responses
12 views
0 likes
|
Last Post
by reynoldsn
Today, 05:56 PM
|
||
Started by bortz, 11-06-2023, 08:04 AM
|
51 responses
1,992 views
0 likes
|
Last Post
by aligator
Today, 05:50 PM
|
||
Started by dmking, 11-12-2019, 12:31 PM
|
4 responses
4,157 views
0 likes
|
Last Post
by jasonw
Today, 04:32 PM
|
Comment