Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

display of FibExtension dependent on zoom (mostly not there)

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

    display of FibExtension dependent on zoom (mostly not there)

    Hi,
    I've got an indicator in NT8 b10 that does some custom potting in OnRender, and also draws a FibExtension tool.
    The FibExtension is mostly not visible, for reasons I cannot fathom, unless I squash the chart up to its least zoom level.
    I have checked the OnRender() code, and my code is not crashing and the base.OnRender() is being called as it should.
    Attached are two pictures, the only difference is one click of zoom.
    Attached Files

    #2
    Hello,

    Thank you for the question.

    I wanted to check if you have a simple example that shows this, if not could you provide a sample that simply draws one FibExtension and utilizes whatever code is needed in on render to demonstrate this?

    If I could see the syntax causing this, I may be able to determine what is occurring, if not I could forward that on to development for further review.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse,
      the code is 700 lines or so already, and the graphics in OnRender() relies on data gathered from manually drawn triangles (which takes some analysis) so a 'simple' version of it is not available. However, the basics of the FibExtension drawing is done like this:

      Code:
      Triangle t = (Triangle)t_object;
      if (developer) Print("Drawing retracement "+t.Tag);
      Draw.FibonacciExtensions(this,t.Tag+"Extension",false,t.StartAnchor.Time,t.StartAnchor.Price,t.MiddleAnchor.Time,t.MiddleAnchor.Price,t.EndAnchor.Time,t.EndAnchor.Price,false,FibExtension_Template);
      As I mentioned, via debug lines in the code I can see that the retracement gets drawn properly and the custom graphics code in OnRender is not crashing. A change in chart zoom (which my code doesn't care about) nonetheless breaks visibility of the FibExt on the chart.

      Comment


        #4
        An update: this may be related to the Equidistant Bar Spacing introduced in beta10.

        If I turn this off, I get an exception inside the FibonacciExtension:

        Code:
        System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
        Parameter name: index
           at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
           at NinjaTrader.Data.BarsSeries.GetTime(Int32 index)
           at NinjaTrader.Data.BarsSeries.GetSessionEndTime(Int32 index)
           at NinjaTrader.Data.Bars.GetSessionEndTime(Int32 index)
           at NinjaTrader.Gui.Chart.ChartControl.GetXByBarIndex(ChartBars chartBars, Int32 barIndex)
           at NinjaTrader.NinjaScript.DrawingTools.Draw.FibonacciCore[T](NinjaScriptBase owner, Boolean isAutoScale, String tag, Int32 startBarsAgo, DateTime startTime, Double startY, Int32 endBarsAgo, DateTime endTime, Double endY, Boolean isGlobal, String templateName)
           at NinjaTrader.NinjaScript.DrawingTools.Draw.FibonacciExtensionsCore(NinjaScriptBase owner, Boolean isAutoScale, String tag, Int32 startBarsAgo, DateTime startTime, Double startY, Int32 endBarsAgo, DateTime endTime, Double endY, Int32 extensionBarsAgo, DateTime extensionTime, Double extensionY, Boolean isGlobal, String templateName)
           at NinjaTrader.NinjaScript.DrawingTools.Draw.FibonacciExtensions(NinjaScriptBase owner, String tag, Boolean isAutoScale, DateTime startTime, Double startY, DateTime endTime, Double endY, DateTime extensionTime, Double extensionY, Boolean isGlobal, String templateName)

        Note that the three times used to create the fib extension ARE valid times, as they are the three points of a triangle existing on the chart already.

        cheers,
        saltminer

        Comment


          #5
          Hello,

          Thank you for the clarification.

          I tested various ways of creating a FibonacciExtension, both from code and from manually drawing it but have not yet seen this.

          Have you checked if you comment out the OnRender code you are using, does this still occur? If so it may be the values being used which helps show this. Would you be able to provide the specific values you are using as an example if this is the case?

          If the on render code is controlling this, I believe in that case you would need to make a refined example for me to be able to see this.

          I look forward to being of further assistance.
          JesseNinjaTrader Customer Service

          Comment


            #6
            Saltminer is coding this indicator for me.

            Hi Jesse,
            Saltminer is coding this indicator for me.
            He sent me a beta version to assess, which I loaded into NT8 b9.
            It worked perfectly, the fibs displayed at any and all zoom levels.
            I then upgraded to NT8 b10, and experienced the very same problem as Saltminer.
            The fibs wouldn't display at all zoom levels. As I zoomed in and out they would appear and disappear, they would stay on screen at minimum zoom.

            So something was mucked up with the changes made from b9 to b10.

            Hope this helps.

            Ken.

            Comment


              #7
              Hello,

              Thank you for the reply.

              Unfortunately I would still need some sort of way to reproduce this to provide to development.

              I have not yet been able to reproduce this by the description alone which is not enough to create a bug report.

              If either of you could provide a simple example that includes the values used in the Fibonacci that recreates this, I could further address the problem and report it. Otherwise if a sample can not be furnished I would suggest waiting for B11 to see if it has been addressed with the changes in that version.

              I look forward to being of further assistance.
              JesseNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by algospoke, Yesterday, 06:40 PM
              2 responses
              19 views
              0 likes
              Last Post algospoke  
              Started by ghoul, Today, 06:02 PM
              3 responses
              14 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by jeronymite, 04-12-2024, 04:26 PM
              3 responses
              45 views
              0 likes
              Last Post jeronymite  
              Started by Barry Milan, Yesterday, 10:35 PM
              7 responses
              21 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by AttiM, 02-14-2024, 05:20 PM
              10 responses
              181 views
              0 likes
              Last Post jeronymite  
              Working...
              X