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

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.

        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 RookieTrader, Today, 09:37 AM
          3 responses
          15 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by kulwinder73, Today, 10:31 AM
          0 responses
          5 views
          0 likes
          Last Post kulwinder73  
          Started by terofs, Yesterday, 04:18 PM
          1 response
          23 views
          0 likes
          Last Post terofs
          by terofs
           
          Started by CommonWhale, Today, 09:55 AM
          1 response
          4 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by Gerik, Today, 09:40 AM
          2 responses
          7 views
          0 likes
          Last Post Gerik
          by Gerik
           
          Working...
          X