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

    #16
    NT 8.0.20... Issue NTEIGHT-14067 is reported as fixed... but it is not....at least my initial tests show no change in behaviour.

    Comment


      #17
      It is not fixed for me either.

      Comment


        #18
        Hello,

        I have included a video demonstration of the steps that we have used on our end, and I have included the steps as well.

        If we are still hitting this issue, could you provide me some similar steps where I can reproduce so we can report that case?

        1. Open NinjaScript Editor
        2. Open CandleStickPattern Tab 1 and FibonacciPivots Tab 2
        3. In FibonacciPivots, use mouse to place cursor at line 471, to the right of return adjusted;
        4. Switch to CandleStickPattern
        5. Switch back to FibonacciPivots
        6. Cursor is not seen, but line is highlighted.
        7. Press Up Arrow and cursor goes to line 34
        Demo - https://drive.google.com/file/d/1tb7...w?usp=drivesdk

        I look forward to assisting.
        JimNinjaTrader Customer Service

        Comment


          #19
          I duplicated your steps with the same result that you had. I tried similar steps with other indicators and found no cursor location problem when changing between tabs. However, I am currently refining a new proprietary Strategy script that in addition to automatically placing orders also plots an indicator over the price bars. It compiles without error and seems to run correctly with both generated orders and the plot appearing to be correct. Even so, maybe I violated a coding rule of some kind that confuses the editor, because if I open that script in one editor tab and any script in another tab, position the mouse pointer within each of them, and then change tabs, the mouse pointer in my new Strategy script is always initially positioned at the end of the "[Display(Name="CutoffPeriod", Order=0, GroupName="Parameters")]" line in the section of code below, regardless of where it had been before changing tabs.

          Code:
                  #region Properties
                  [NinjaScriptProperty]
                  [Range(3, double.MaxValue)]
                  [Display(Name="CutoffPeriod", Order=0, GroupName="Parameters")]
                  public double CutoffPeriod
                  { get; set; }
          
                  [Browsable(false)]
                  [XmlIgnore]
                  public Series<double> Prediction
                  {
                      get { return Values[0]; }
                  }
                  #endregion

          Comment


            #20
            Hello caveat_lector,

            I'll really need some specific steps to note or will need to observe the steps taken in a video so we can report other cases where this behavior is seen.

            Would you be able to provide an export of a script and some steps I can take (listed similarly to what I have provided) to reproduce? If you would not like to share the script publicly on the forums, you can send me an email at platformsupport [at] ninjatrader [dot] com with the text "Attn Jim 2285808" with a link to this thread.
            JimNinjaTrader Customer Service

            Comment


              #21
              The steps with my proprietary script were the same as yours, except for the line number in my script. I will strip-out parts of the code I don't want to disclose and see if I can create a simpler version that causes the same editor behavior.

              Comment


                #22
                I saved a copy of my script with different name, gutted most of the code from the copy, compiled the portion left, and followed steps similar to yours to see if the editor would remember the mouse cursor position when switching between tabs. It did with the gutted copy, but not with the original that was still open in one of the tabs. I proceeded to copy and paste sections of my code back in, expecting to find some portion that caused the problem, but didn't. With everything fully restored the mouse cursor position was remembered after tab selections with the copy, but not with the original. I used Ctrl-A to select and then copy the code from each script into WinMerge, a Windows-based utility that can be used to compare two text files and selectively merge differences. It confirmed that every character, including blank lines, spaces and tab characters were identical, except for the public class names, which of course were different because of the different script names.

                That caused me to think something about my original script name must be causing the problem. I saved the original under a third name, and opened the new copy. It didn't have the problem and original still did, which seemed to confirm the script-name idea. However, following that I closed the tab containing the original script, re-opened it in a new tab, and the problem was gone! It hadn't been the script or the script-name, something had been wrong with that tab window.

                My original script had been open continuously in the same tab a couple days as I had been writing and debugging new code. There had been compile errors and various warnings about things that would have to be fixed before the script could be compiled, as there normally are while developing new code. My theory at this point is that one of those error conditions left the editing window associated with that tab "messed-up" someway such that mouse cursor restoration failed to function normally.

                Comment


                  #23
                  Hello caveat_lector,

                  We may not need to reduce the code to a specific set of lines that reproduce the issue. If you can provide me an export of the full script that I can import on my end to test and hit the issue, it can at least help to bring the other case(s) to the attention of the Development team.

                  If you have a script and steps I can follow where the script can be shared publicly, please do so here. If we can hit this case with a script which you would like to keep private, please email me with the test script with steps to take. (Please include the text I had listed in post #20.)

                  I look forward to investigating any cases where this issue may arise.
                  JimNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by George21, Today, 10:07 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post George21  
                  Started by Stanfillirenfro, Today, 07:23 AM
                  8 responses
                  23 views
                  0 likes
                  Last Post Stanfillirenfro  
                  Started by DayTradingDEMON, Today, 09:28 AM
                  2 responses
                  15 views
                  0 likes
                  Last Post DayTradingDEMON  
                  Started by navyguy06, Today, 09:28 AM
                  1 response
                  6 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by cmtjoancolmenero, Yesterday, 03:58 PM
                  8 responses
                  32 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Working...
                  X