Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Changing document in editor - cursor position is lost

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

    Changing document in editor - cursor position is lost

    Hi,
    been frustrated by this for ages... I usually have several Ninja scripts open in the editor in multiple tabs, and often flick between them... sometime to cut&paste new sections of code, for example.

    When I do... the cursor position typically jumps to some other place than where I was last editing (near top of code). When a strategy/indicator has about 1000 lines of code... this is a real annoyance! Maybe not if your code is only like 40 lines... but...

    Can't find a property to "fix" this...

    If there is none, maybe I should add this as a requested new feature?

    Regards,
    T.
    Last edited by tgn55; 09-24-2019, 06:49 AM.

    #2
    I am unable to reproduce this symptom. Does this occur 100% of the time? Or does it seem more intermittent? What exact steps should I take to reproduce what you're reporting?

    Comment


      #3
      For me it happens pretty much all the time (hence my frustration!)... and sometimes, the cursor position after switching seems entirely random... other times, it goes to near the start of the class definition. Either way, most of the time I need to find the line again where I had focus.

      BTW, I recently reinstalled NT 8.0.18.1... I have about 14 editor tabs open right now...rather a lot, but surely this behaviour should not depend on that. I'm in the thi9ck of debugging... will try to report back later tonight (I'm in a very different timezone... currently almost 1 AM ;-) if I can provide any more clues.

      Cheers,

      Comment


        #4
        OK... so I closed the editor window I've had open for ages, and started with a fresh one.
        I think I can more clearly describe the problem behaviour now... With my Dark skin, it is not always easy to pick up where the cursor is... so it seemed a keen idea to switch tabs, and then just use the keyboard arrow buttons (left or right, up/down whatever...) WITHOUT mouse clicking anywhere, so as to "find" the line of code I was at. Well... wrong!

        It seems the editor, after context switching, probably searches for the "public class xxxxx" line when you use one of the arrow keys.. Regardless of where you were actually editing. This is best demonstrated by looking at the indicators CandleStickPattern or FibonacciPivots. Why? Well those guys actually have TWO classes defined in the one .cs document.

        So what has been happening is my attempt to "find" the cursor, in fact MOVES the cursor to ... maybe the next occurrence of a class definition? Something like that. The editor does seem to retain the line number... it is "highlighted" albeit real easy to miss on a Dark skin. It does NOT seem to save the actual cursor character position... so if you swap tabs, then resume typing ordinary text instead of using the arrow keys...

        BTW, same thing applies if instead of hitting say down arrow... you just start typing text. The new text will appear somewhere other than where you were last entering text. Hmm.. not great...

        Hopefully you can replicate this behaviour... and perhaps raise a ticket to save a bit more state information?

        Cheers,
        T.
        Last edited by tgn55; 10-02-2019, 07:22 PM.

        Comment


          #5
          Originally posted by tgn55 View Post
          When I do... the cursor position typically jumps to some other place than where I was last editing (near top of code). When a strategy/indicator has about 1000 lines of code... this is a real annoyance!

          I experience this from time to time as well.. It's not 100% duplicatable, but seems to happen more when I open a workspace that has multiple tabs already open..

          At first seems to work fine.. but after a compile.. That's when I seem to notice the cursor not remaining in the same place when changing between tabs..

          But I'm just guessing here, as I have not spent a lot of time trying to troubleshoot or reliably duplicate.. Shut workspace down and open back up seems to fix..



          -=Edge=-
          NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

          Comment


            #6
            Hello Edge and tgn55,

            I believe I have been able to reproduce these symptoms. I've recorded a demo of how I have been able to reproduce in case there is another item we would need to look at.



            This may be specific to the ActiPro software that NinjaTrader uses in the NinjaScript Editor or it might be a NinjaTrader issue. I'm not sure at this point, but I have reported the issue to our development team.

            I'll keep you posted as this develops.

            Please let me know if there is anything else I should be looking in regards to the cursor.
            JimNinjaTrader Customer Service

            Comment


              #7
              Hey Jim... yeah, that pretty much is it... I messed a bit with CandleStickPattern, as I'm pretty sure it does things a little different than a simple file that (typically) only has the one class defined. But I am not really able to figure it out... but then, last night I pulled an all-nighter, and tonight it is now 2:30 AM in my part of the world, so I'm probably not thinking too clearly, hey? ;-)

              Just did a final check... and guess what? It now appears to be working !@#$
              The thing that is immediately obvious... when I switch tabs, I now DO see the flashing cursor... and arrow key-presses "behave". The two seem to be linked. Dang...

              I have no idea what changed since I posted... I did go into the NS Editor Properties menu yesterday and checked the Auto bracket completion thingy... but I just reversed that, but it made no difference.

              So unfortunately, it seems it is not 100% guaranteed to fail... and I don't know what triggers it. But at this hour of the night... I'll happily hand it back to you to follow up!

              Thankyou for recording the demo... it definitely is worth the effort.

              Cheers,
              T.
              Last edited by tgn55; 10-03-2019, 11:25 AM.

              Comment


                #8
                I would like to note that this issue usually plagues my editing efforts when switching between editor tabs also. A great way to waste time and create frustration. I hope it can be fixed.
                eDanny
                NinjaTrader Ecosystem Vendor - Integrity Traders

                Comment


                  #9
                  Kinda glad to hear I'm not the only one that has been suffering with this ;-) Let's hope it can indeed be resolved.

                  I do much of my editing in Visual Studio ... but sometimes its just not worth the overhead of firing up VS... which is when this weird behaviour really "bugs me" !

                  Thanks for adding your voice eDanny!
                  T.

                  Comment


                    #10
                    Hello everyone,

                    We are currently tracking this issue with the ticket ID NTEIGHT-14067. The number for this ID can be found in the Release Notes page of the Help Guide when a new version of NinjaTrader gets released with a fix. Please note that we cannot offer an ETA on release schedules.

                    Release Notes - https://ninjatrader.com/support/help...ease_notes.htm
                    JimNinjaTrader Customer Service

                    Comment


                      #11
                      Great - thanks Jim! I will verify after next release.

                      Comment


                        #12
                        Originally posted by tgn55 View Post
                        Great - thanks Jim! I will verify after next release.
                        So will I. It is a most annoying and frustrating thing to have to suffer.

                        Comment


                          #13
                          It sure is... Quite frankly, I'm gobsmacked that 3 years after NT8 was released, basic UI issues like this still exist. Anyway, Jim does a really great job of following up when we report stuff... I am just amazed that nobody else reported this apparently until now...or nobody followed it up like Jim has. (Thanks Jim !!)

                          Then again... I am more amazed that some of the Strategy Analyser financial reporting I've commented on is still seriously broke... like a walk-forward that has overall $18,000 profit over a year, but monthly Profit is reported as NEGATIVE $1,200 or something similar... Sheesh...

                          Sorry Jim... getting off topic, and into general rant mode. I understand if you delete this from the forum !!

                          Comment


                            #14
                            Thanks for your comments.

                            tgn55, I still have that ticket open. I have not yet been able to create a test strategy that can we can use to create a formal issue report, but I have it as a back burner task so we can get the ball rolling there. If you have time to prepare a simple test strategy that we can use to report the behavior, it can help to get the issue onto our QA and Development team's desk.
                            JimNinjaTrader Customer Service

                            Comment


                              #15
                              OK, I'm still pretty flat out trying to make a living out of trading... but will revisit this ASAP. I know the issue of timing of trades was implicated, I get that... so it is not trivial to resolve without making some significant change to current reporting behaviour... but I think it is warranted given the magnitude of the "WTF ??" factor !! I'll save more comment for the other topic thread ;-)

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by judysamnt7, 03-13-2023, 09:11 AM
                              4 responses
                              57 views
                              0 likes
                              Last Post DynamicTest  
                              Started by ScottWalsh, Today, 06:52 PM
                              4 responses
                              36 views
                              0 likes
                              Last Post ScottWalsh  
                              Started by olisav57, Today, 07:39 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post olisav57  
                              Started by trilliantrader, Today, 03:01 PM
                              2 responses
                              19 views
                              0 likes
                              Last Post helpwanted  
                              Started by cre8able, Today, 07:24 PM
                              0 responses
                              9 views
                              0 likes
                              Last Post cre8able  
                              Working...
                              X