Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Big bug in ninja trader!!! Please take a look!

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

    Big bug in ninja trader!!! Please take a look!

    Hi,

    there is a really big bug in Ninja:

    I did the following:

    1. Open a 3 Range chart of any instrument.
    2. Put this indicator on your chart
    (It's just:

    if ( Close[0] == Open[0] )
    BarColor = Color.Yellow;

    )

    3. Tell me why not every candle were the Close=Open becomes colored yellow ???

    Here a screenshot:
    Attached Files

    #2
    Originally posted by easyfresh3000 View Post
    Hi,

    there is a really big bug in Ninja:

    I did the following:

    1. Open a 3 Range chart of any instrument.
    2. Put this indicator on your chart
    (It's just:

    if ( Close[0] == Open[0] )
    BarColor = Color.Yellow;

    )


    3. Tell me why not every candle were the Close=Open becomes colored yellow ???

    Here a screenshot:
    It is double.Epsilon issue.

    You can try replacing your condition like this:

    if ( Math.Abs(Close[0] - Open[0]) < TickSize * 0.5 )
    BarColor = Color.Yellow;
    Last edited by roonius; 12-16-2009, 12:58 PM.

    Comment


      #3
      Thanks for your response!

      Now it looks better. That means every Open=Close bar
      is colored yellow.
      But also every bar were Open and Close only one tick away.

      Please look at the screenshot.
      What means double epsilon issue ?
      Attached Files

      Comment


        #4
        Originally posted by easyfresh3000 View Post
        Thanks for your response!

        Now it looks better. That means every Open=Close bar
        is colored yellow.
        But also every bar were Open and Close only one tick away.

        Please look at the screenshot.
        What means double epsilon issue ?
        I just edited my post (see below) to TickSize * 0.5

        double.Epsilon is C# thing when dealing with double values - you have to be careful when comparing them.

        I am grappling with the idea of double.Epsilon. I have written the following test: [Test] public void FuzzyDivisionTest() { double a = 0.33333d; double b = 1d / 3d; Assert.IsFalse(a == b, &quot;Built-in == operator should not be fuzzy&quot;); Assert.IsTrue( a-b &lt; double.Epsilon); Assert.IsTrue( Math.Abs(a-b) &lt; double

        Comment


          #5
          Thank you so much!!!

          I have to clarify:

          IT'S NOT A NINJA TRADER BUG.
          -only a programming issue

          NINJA TRADER IS THE BEST TRADING PLATFORM EVER !!!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          599 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          344 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          558 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          557 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X