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

IRectangle.EndTime glitch

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

    IRectangle.EndTime glitch

    It appears that there is a glitch with using Ninjascript to set a new EndTime value on an existing rectangle. This causes the rectangle to go out of bounds.

    Steps to reproduce:
    1. Manually draw a rectangle
    2. Using Ninjascript, change the rectangle's EndTime to a reasonable value within range.
    3. Observe the rectangle.
    4. Double-click the rectangle end manually edit the end time to a new value. Click Apply. The rectangle will straighten up again.
    5. Now edit the end time value to the one you used in Ninjascript. Observe that the rectangle is, again, rendering properly.

    See attached screenshot for further analysis.

    Edit:

    See the third attached screenshot. It looks like the problem is that EndBarsAgo gets recalculated wrongfully.
    Attached Files
    Last edited by xsgex; 12-21-2016, 03:10 PM.

    #2
    Hello xsgex, and thank you for your report.

    Please note that while NinjaTrader 7 will continue to be supported for at least a year for legacy users, NinjaTrader 8 is the version under active development.

    I was unable to see quite the same thing on my end that you saw on yours with the attached script. Could you review the script I am sending your way on your end using NinjaTrader 8, on a 5 second chart so that the script attempts to grab the right edge frequently, and let us know if you are still able to reproduce this with the attached script? If you are not, please compare your method to ours and let us know if you have any questions. If you are, please give us any information you believe can help (screen shots of your indicator settings (instructions below), this sort of thing) so we can assist further.

    Thank you for your help improving NinjaTrader.
    Attached Files
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Your script works in NinjaTrader 8 as expected. However, the same script (of course adapted for NT7) keeps triggering the glitch in NinjaTrader 7. Attached is the script I am using. Please run in NT7 and observe what happens to the rectangle.
      Attached Files

      Comment


        #4
        Since NT7 is no longer under active development, I am attempting to create a work-around based on your code. I will report back with my findings tomorrow. If I am unable to do so a bug report will be generated.
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          A work-around would be great. Looking forward to your reply tomorrow.

          Comment


            #6
            Hello xsgex,

            The attached script will render user drawn rectangles (which can not be removed by a script) invisible, and convert them to script drawn rectangles which can be modified programmatically. Old script drawn rectangle references will be removed.
            Attached Files
            Jessica P.NinjaTrader Customer Service

            Comment


              #7
              Jessica,

              Thank you for the workaround. It will do the job, however if the user attempted to remove the new rectangle created by the script, they will also disable the indicator.

              At this point I think I should consider moving to NT8.

              Thanks.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Barry Milan, Today, 10:35 PM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by WeyldFalcon, 12-10-2020, 06:48 PM
              14 responses
              1,427 views
              0 likes
              Last Post Handclap0241  
              Started by DJ888, Yesterday, 06:09 PM
              2 responses
              9 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by jeronymite, 04-12-2024, 04:26 PM
              3 responses
              40 views
              0 likes
              Last Post jeronymite  
              Started by bill2023, Today, 08:51 AM
              2 responses
              16 views
              0 likes
              Last Post bill2023  
              Working...
              X