Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bug in range

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

    Bug in range

    i am doing a simple indicator based on range.
    if (FirstTickOfBar)
    {
    // look for nr7 indicator info.


    double LastBarRange=Range()[1];
    double MininLast7Bars=MIN(Range(), 7)[1];
    if(MininLast7Bars==LastBarRange) {
    NR7.Set(1,1);
    }
    Print(Time.ToString() + "Checking every bar" + "LastBarRange" + LastBarRange + " MininLast7Bars : " + MininLast7Bars);


    }

    i get the range =0 many times. This is strange as i have the chart showing a good movement on ES at the same time. in fact the last bar range shows >0 but the MininLast7bars shows 0.

    01/07/2010 3:25:00 PMChecking every barLastBarRange1 MininLast7Bars : 0.75
    01/07/2010 3:26:00 PMChecking every barLastBarRange0.75 MininLast7Bars : 0
    01/07/2010 3:27:00 PMChecking every barLastBarRange1 MininLast7Bars : 0
    01/07/2010 3:28:00 PMChecking every barLastBarRange2 MininLast7Bars : 0
    01/07/2010 3:29:00 PMChecking every barLastBarRange1.5 MininLast7Bars : 0
    01/07/2010 3:30:00 PMChecking every barLastBarRange0.75 MininLast7Bars : 0
    01/07/2010 3:31:00 PMChecking every barLastBarRange1 MininLast7Bars : 0
    01/07/2010 3:32:00 PMChecking every barLastBarRange1.5 MininLast7Bars : 0
    01/07/2010 3:33:00 PMChecking every barLastBarRange1 MininLast7Bars : 0

    #2
    Hello Junkone,

    There was an issue with MIN and MAX with release 17 of NinjaTrader 7.

    Can you confirm the version you're on by checking Help > About. You can download the latest release 18 at the link below:
    http://www.ninjatrader.com/webnew/download_download.htm

    Let us know if you're still seeing this with 7.0.0.18
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      i upgraded my NT
      World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


      i continue to have it.
      01/07/2010 4:33:00 PMChecking every barLastBarRange0.000700000000000145 MininLast7Bars : 9.9999999999989E-05
      01/07/2010 4:34:00 PMChecking every barLastBarRange0.000650000000000039 MininLast7Bars : 9.9999999999989E-05
      01/07/2010 4:34:00 PMChecking every barLastBarRange0.000650000000000039 MininLast7Bars : 9.9999999999989E-05
      01/07/2010 4:35:00 PMChecking every barLastBarRange0.000299999999999967 MininLast7Bars : 9.9999999999989E-05
      01/07/2010 4:35:00 PMChecking every barLastBarRange0.000299999999999967 MininLast7Bars : 9.9999999999989E-05
      01/07/2010 4:36:00 PMChecking every barLastBarRange0.000199999999999978 MininLast7Bars : 9.9999999999989E-05
      01/07/2010 4:36:00 PMChecking every barLastBarRange0.000199999999999978 MininLast7Bars : 9.9999999999989E-05
      01/07/2010 4:37:00 PMChecking every barLastBarRange0.000449999999999839 MininLast7Bars : 9.9999999999989E-05
      01/07/2010 4:37:00 PMChecking every barLastBarRange0.000449999999999839 MininLast7Bars : 9.9999999999989E-05
      01/07/2010 4:38:00 PMChecking every barLastBarRange0.000150000000000095 MininLast7Bars : 9.9999999999989E-05
      01/07/2010 4:38:00 PMChecking every barLastBarRange0.000150000000000095 MininLast7Bars : 9.9999999999989E-05
      01/07/2010 4:39:00 PMChecking every barLastBarRange0 MininLast7Bars : 0
      01/07/2010 4:39:00 PMChecking every barLastBarRange0 MininLast7Bars : 0
      01/07/2010 4:40:00 PMChecking every barLastBarRange0.000499999999999945 MininLast7Bars : 0
      01/07/2010 4:40:00 PMChecking every barLastBarRange0.000499999999999945 MininLast7Bars : 0
      01/07/2010 4:41:00 PMChecking every barLastBarRange0.000399999999999956 MininLast7Bars : 0
      01/07/2010 4:41:00 PMChecking every barLastBarRange0.000399999999999956 MininLast7Bars : 0
      01/07/2010 4:42:00 PMChecking every barLastBarRange9.9999999999989E-05 MininLast7Bars : 0
      01/07/2010 4:42:00 PMChecking every barLastBarRange9.9999999999989E-05 MininLast7Bars : 0
      01/07/2010 4:43:00 PMChecking every barLastBarRange0.000350000000000072 MininLast7Bars : 0
      01/07/2010 4:43:00 PMChecking every barLastBarRange0.000350000000000072 MininLast7Bars : 0
      01/07/2010 4:44:00 PMChecking every barLastBarRange9.9999999999989E-05 MininLast7Bars : 0
      01/07/2010 4:44:00 PMChecking every barLastBarRange9.9999999999989E-05 MininLast7Bars : 0
      01/07/2010 4:45:00 PMChecking every barLastBarRange0.000600000000000156 MininLast7Bars : 0
      01/07/2010 4:45:00 PMChecking every barLastBarRange0.000600000000000156 MininLast7Bars : 0

      Comment


        #4
        Junkone,

        Thanks for the code. It's working as expected here. Not seeing the zero values you are. Try recompiling and reapplying the indicator.

        From your last post, you may be running into floating point arithmetic issues. Please see this page for ways of handling this.

        7/1/2010 1:50:00 PMChecking every barLastBarRange4.5 MininLast7Bars : 3.25
        7/1/2010 2:00:00 PMChecking every barLastBarRange4.75 MininLast7Bars : 3.25
        7/1/2010 2:10:00 PMChecking every barLastBarRange6 MininLast7Bars : 3.25
        7/1/2010 2:20:00 PMChecking every barLastBarRange2 MininLast7Bars : 2
        7/1/2010 2:40:00 PMChecking every barLastBarRange1.5 MininLast7Bars : 1.5
        7/1/2010 2:50:00 PMChecking every barLastBarRange1.25 MininLast7Bars : 1.25
        7/1/2010 3:00:00 PMChecking every barLastBarRange0.75 MininLast7Bars : 0.75
        7/1/2010 3:10:00 PMChecking every barLastBarRange0.75 MininLast7Bars : 0.75
        7/1/2010 3:20:00 PMChecking every barLastBarRange1 MininLast7Bars : 0.75

        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        598 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        343 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
        557 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        555 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X