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 cmoran13, 04-16-2026, 01:02 PM
          0 responses
          42 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          25 views
          0 likes
          Last Post PaulMohn  
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          162 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          98 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          157 views
          2 likes
          Last Post CaptainJack  
          Working...
          X