Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Lows[] []is NOT working, Highs too

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

    Lows[] []is NOT working, Highs too

    see ES 12-11 3 minute chart.

    Highs is looking MOSTLY ok since we are in a downtrend, but Lows keeps putting in 1188.00?!? And I think if we are uptrending, I get a problem with the Highs.



    [1]=1184.00 ,09/19 09:54:00 [ES][0]=1184.00 ,09/19 09:51:22 [ES1][0]=1184.00 ,09/19 09:54:00 Lows[ES1][0]=1188.00 Highs[ES1][0]=1184.25
    [1]=1183.50 ,09/19 09:51:00 [ES][1]=1184.00 ,09/19 09:51:22 [ES1][1]=1183.50 ,09/19 09:51:00 Lows[ES1][1]=1188.00 Highs[ES1][1]=1186.00
    [1]=1186.00 ,09/19 09:48:00 [ES][2]=1184.00 ,09/19 09:50:28 [ES1][2]=1186.00 ,09/19 09:48:00 Lows[ES1][2]=1188.00 Highs[ES1][2]=1186.75
    [1]=1186.75 ,09/19 09:45:00 [ES][3]=1184.75 ,09/19 09:49:46 [ES1][3]=1186.75 ,09/19 09:45:00 Lows[ES1][3]=1188.00 Highs[ES1][3]=1188.50
    [1]=1188.00 ,09/19 09:42:00 [ES][4]=1184.25 ,09/19 09:48:52 [ES1][4]=1188.00 ,09/19 09:42:00 Lows[ES1][4]=1188.00 Highs[ES1][4]=1189.75
    [1]=1188.00 ,09/19 09:39:00 [ES][5]=1185.00 ,09/19 09:48:11 [ES1][5]=1188.00 ,09/19 09:39:00 Lows[ES1][5]=1187.75 Highs[ES1][5]=1191.25
    [1]=1190.75 ,09/19 09:36:00 [ES][6]=1185.50 ,09/19 09:47:42 [ES1][6]=1190.75 ,09/19 09:36:00 Lows[ES1][6]=1188.00 Highs[ES1][6]=1190.75


    I have a 4 range ES 12-11 chart, and added an ES 12-11 3 minute chart, and I'm examining when BarsInProgress =1 (= ES1 ).


    protected override void Initialize()
    {
    CalculateOnBarClose = false;
    Add("ES 12-11", PeriodType.Minute, 3);

    ...

    if (Historical) return;

    if ( BarsInProgress != 1)
    return;

    Also the indexing appears off when searching for HighestBar (even LowestBar is picking up 1188.00's )..

    My HighestBar of 10 candels back, returns 6 on the 3 minute chart, but the highest bar is really on bar #5!? Do I need to subtract 1 on the highestbar and lowestbar?


    LowestBar(10)=1 HighestBar(10)=6 Bars.BarsSinceSession = 216 lookback=10
    Lows bar#0-1188.00,Highs bar#5-1191.25
    Lows bar#1-1188.00,Highs bar#6-1190.75
    Lows bar#2-1188.00,Highs bar#7-1190.00

    Anyways, looking at the chart, RIGHT TO LEFT,
    lows were 1183, 1183, 1184.75, 1185.50, 1186.25, 1187.75.
    highs where 1184.25, 1186, 1186.75, 1188.50,1188.25, 1191.25

    Highs[ES1][4]=1189.75 is WRONG.


    Attached Files

    #2
    Originally posted by sledge View Post
    see ES 12-11 3 minute chart.

    Highs is looking MOSTLY ok since we are in a downtrend, but Lows keeps putting in 1188.00?!? And I think if we are uptrending, I get a problem with the Highs.



    [1]=1184.00 ,09/19 09:54:00 [ES][0]=1184.00 ,09/19 09:51:22 [ES1][0]=1184.00 ,09/19 09:54:00 Lows[ES1][0]=1188.00 Highs[ES1][0]=1184.25
    [1]=1183.50 ,09/19 09:51:00 [ES][1]=1184.00 ,09/19 09:51:22 [ES1][1]=1183.50 ,09/19 09:51:00 Lows[ES1][1]=1188.00 Highs[ES1][1]=1186.00
    [1]=1186.00 ,09/19 09:48:00 [ES][2]=1184.00 ,09/19 09:50:28 [ES1][2]=1186.00 ,09/19 09:48:00 Lows[ES1][2]=1188.00 Highs[ES1][2]=1186.75
    [1]=1186.75 ,09/19 09:45:00 [ES][3]=1184.75 ,09/19 09:49:46 [ES1][3]=1186.75 ,09/19 09:45:00 Lows[ES1][3]=1188.00 Highs[ES1][3]=1188.50
    [1]=1188.00 ,09/19 09:42:00 [ES][4]=1184.25 ,09/19 09:48:52 [ES1][4]=1188.00 ,09/19 09:42:00 Lows[ES1][4]=1188.00 Highs[ES1][4]=1189.75
    [1]=1188.00 ,09/19 09:39:00 [ES][5]=1185.00 ,09/19 09:48:11 [ES1][5]=1188.00 ,09/19 09:39:00 Lows[ES1][5]=1187.75 Highs[ES1][5]=1191.25
    [1]=1190.75 ,09/19 09:36:00 [ES][6]=1185.50 ,09/19 09:47:42 [ES1][6]=1190.75 ,09/19 09:36:00 Lows[ES1][6]=1188.00 Highs[ES1][6]=1190.75


    I have a 4 range ES 12-11 chart, and added an ES 12-11 3 minute chart, and I'm examining when BarsInProgress =1 (= ES1 ).


    protected override void Initialize()
    {
    CalculateOnBarClose = false;
    Add("ES 12-11", PeriodType.Minute, 3);

    ...

    if (Historical) return;

    if ( BarsInProgress != 1)
    return;

    Also the indexing appears off when searching for HighestBar (even LowestBar is picking up 1188.00's )..

    My HighestBar of 10 candels back, returns 6 on the 3 minute chart, but the highest bar is really on bar #5!? Do I need to subtract 1 on the highestbar and lowestbar?


    LowestBar(10)=1 HighestBar(10)=6 Bars.BarsSinceSession = 216 lookback=10
    Lows bar#0-1188.00,Highs bar#5-1191.25
    Lows bar#1-1188.00,Highs bar#6-1190.75
    Lows bar#2-1188.00,Highs bar#7-1190.00

    Anyways, looking at the chart, RIGHT TO LEFT,
    lows were 1183, 1183, 1184.75, 1185.50, 1186.25, 1187.75.
    highs where 1184.25, 1186, 1186.75, 1188.50,1188.25, 1191.25

    Highs[ES1][4]=1189.75 is WRONG.


    HighestBar() and LowestBar() includes the CurrentBar, so yes, you need to adjust the index correctly. It gave me no end of fits until I figured it out by looking at the chart together with the code that I wrote. I was swearing a blue streak until I saw the output of the Print() statements.

    Comment


      #3
      Originally posted by koganam View Post
      HighestBar() and LowestBar() includes the CurrentBar, so yes, you need to adjust the index correctly. It gave me no end of fits until I figured it out by looking at the chart together with the code that I wrote. I was swearing a blue streak until I saw the output of the Print() statements.

      ES is 0 for the default series strategy is attached to,
      ES1 is for 1, for the attached series
      lookback - i only want to see back 9 bars,

      Code:
      #region Using declarations
      using System;
      using System.ComponentModel;
      using System.Diagnostics;
      using System.Drawing;
      using System.Drawing.Drawing2D;
      using System.Xml.Serialization;
      using NinjaTrader.Cbi;
      using NinjaTrader.Data;
      using NinjaTrader.Indicator;
      using NinjaTrader.Gui.Chart;
      using NinjaTrader.Strategy;
      #endregion
      
      // This namespace holds all strategies and is required. Do not change it.
      namespace NinjaTrader.Strategy
      {
          /// <summary>
          /// Enter the description of your strategy here
          /// </summary>
          [Description("Enter the description of your strategy here")]
          public class eshighlow : Strategy
          {
              #region Variables
              
                  public int lowBar  = 0;
                  public int highBar = 0;
                  public double realLow = 10000;
                  public double realHigh = 0;
              
              // Wizard generated variables
              private int myInput0 = 1; // Default setting for Invariable1
              private double delta1 = .13; //
              // User defined variables (add any user defined variables below)
              public static int ES = 0; // 4 range
              //public static int ES1 = 1;
              public static int ES1 = 1;
      
              public int lookback = 9;
              
              
              
          
              
              #endregion
      
              /// <summary>
              /// This method is used to configure the strategy and is called once before any strategy method is called.
              /// </summary>
              protected override void Initialize()
              {
                  CalculateOnBarClose = false;
                  Add("ES 12-11",    PeriodType.Minute, 3);  //BarsInProgress = 1 = ES1
                      
      
              }
      
          
      /// <summary>
      /// Called on each bar update event (incoming tick)
      /// </summary>
      protected override void OnBarUpdate()
      {
      
          //Print ( "B4 Historical" );
          
          if (Historical) return;
          
          if ( BarsInProgress != 1) 
              return;
      
          lookback = Math.Min(Bars.BarsSinceSession,9)+1 ;
      
          if ( Close[0] < realLow )
              realLow = Close[0];
          if ( Close[0] > realHigh )
              realHigh = Close [0];
          
          Print ( BarsInProgress +" ToTime(Time[0]=" + ToTime(Time[0] ) + "  -- " + ToTime( 9, 37, 00) + " -- " + ToTime( 09, 55, 00));
          
          
          if (    ToTime(Time[0]) >= ToTime( 9, 30, 00)
              &&  ToTime(Time[0]) <= ToTime( 15, 55, 00)) 
          {    
              Print ( "-------------------------------------------------------------------------------------------------------------------------------------------------");
              //Print ( "BarsInProgress = " + BarsInProgress );
              Print ( " ["+BarsInProgress+"]=" + String.Format( "{0,7}" , String.Format( "{0:####.00}" ,Close[0])) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Time[0]) +
                      " [ES][0]=" + String.Format( "{0:0.00}" ,Closes[0][0]) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Times[0][0]) + 
                      " [ES1][0]=" + String.Format( "{0:0.00}" ,Closes[ES1][0]) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Times[ES1][0]) +
                      " Lows[ES1][0]=" + String.Format( "{0:0.00}" ,Lows[ES1][0]) + " Highs[ES1][0]=" + String.Format( "{0:0.00}" ,Highs[ES1][0])+
                      " ZLEMA[ES1][0]=" + String.Format( "{0:0.00}" ,Math.Round (ZLEMA(BarsArray[ES1],3)[0],2) )) ;
              Print ( " ["+BarsInProgress+"]=" + String.Format( "{0,7}" , String.Format( "{0:####.00}" ,Close[1])) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Time[1]) +
                      " [ES][1]=" + String.Format( "{0:0.00}" ,Closes[0][1]) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Times[0][1]) + 
                      " [ES1][1]=" + String.Format( "{0:0.00}" ,Closes[ES1][1]) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Times[ES1][1]) +
                      " Lows[ES1][1]=" + String.Format( "{0:0.00}" ,Lows[ES1][1]) + " Highs[ES1][1]=" + String.Format( "{0:0.00}" ,Highs[ES1][1])+
                      " ZLEMA[ES1][1]=" + String.Format( "{0:0.00}" ,Math.Round (ZLEMA(BarsArray[ES1],3)[1],2) )) ;
              Print ( " ["+BarsInProgress+"]=" + String.Format( "{0,7}" , String.Format( "{0:####.00}" ,Close[2])) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Time[2]) +
                      " [ES][2]=" + String.Format( "{0:0.00}" ,Closes[0][2]) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Times[0][2]) + 
                      " [ES1][2]=" + String.Format( "{0:0.00}" ,Closes[ES1][2]) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Times[ES1][2]) +
                      " Lows[ES1][2]=" + String.Format( "{0:0.00}" ,Lows[ES1][2]) + " Highs[ES1][2]=" + String.Format( "{0:0.00}" ,Highs[ES1][2])+
                      " ZLEMA[ES1][2]=" + String.Format( "{0:0.00}" ,Math.Round (ZLEMA(BarsArray[ES1],3)[2],2) )) ;
              Print ( " ["+BarsInProgress+"]=" + String.Format( "{0,7}" , String.Format( "{0:####.00}" ,Close[3])) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Time[3]) +
                      " [ES][3]=" + String.Format( "{0:0.00}" ,Closes[0][3]) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Times[0][3]) + 
                      " [ES1][3]=" + String.Format( "{0:0.00}" ,Closes[ES1][3]) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Times[ES1][3]) +
                      " Lows[ES1][3]=" + String.Format( "{0:0.00}" ,Lows[ES1][3]) + " Highs[ES1][3]=" + String.Format( "{0:0.00}" ,Highs[ES1][3]) );
              Print ( " ["+BarsInProgress+"]=" + String.Format( "{0,7}" , String.Format( "{0:####.00}" ,Close[4])) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Time[4]) +
                      " [ES][4]=" + String.Format( "{0:0.00}" ,Closes[0][4]) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Times[0][4]) + 
                      " [ES1][4]=" + String.Format( "{0:0.00}" ,Closes[ES1][4]) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Times[ES1][4]) +
                      " Lows[ES1][4]=" + String.Format( "{0:0.00}" ,Lows[ES1][4]) + " Highs[ES1][4]=" + String.Format( "{0:0.00}" ,Highs[ES1][4]) );
              Print ( " ["+BarsInProgress+"]=" + String.Format( "{0,7}" , String.Format( "{0:####.00}" ,Close[5])) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Time[5]) +
                      " [ES][5]=" + String.Format( "{0:0.00}" ,Closes[0][5]) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Times[0][5]) + 
                      " [ES1][5]=" + String.Format( "{0:0.00}" ,Closes[ES1][5]) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Times[ES1][5]) +
                      " Lows[ES1][5]=" + String.Format( "{0:0.00}" ,Lows[ES1][5]) + " Highs[ES1][5]=" + String.Format( "{0:0.00}" ,Highs[ES1][5]) );
              Print ( " ["+BarsInProgress+"]=" + String.Format( "{0,7}" , String.Format( "{0:####.00}" ,Close[6])) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Time[6]) +
                      " [ES][6]=" + String.Format( "{0:0.00}" ,Closes[0][6]) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Times[0][6]) + 
                      " [ES1][6]=" + String.Format( "{0:0.00}" ,Closes[ES1][6]) + " ," + String.Format( "{0:MM/dd HH:mm:ss}",Times[ES1][6]) +
                      " Lows[ES1][6]=" + String.Format( "{0:0.00}" ,Lows[ES1][6]) + " Highs[ES1][6]=" + String.Format( "{0:0.00}" ,Highs[ES1][6]) );
              
              lowBar  = LowestBar (BarsArray[ES1],lookback);
              highBar = HighestBar(BarsArray[ES1],lookback);
      
              
              
              Print ( "LowestBar("+lookback+")=" + lowBar + " HighestBar("+lookback+")=" + highBar + " Bars.BarsSinceSession = " + Bars.BarsSinceSession + " lookback="+lookback);
      
              Print ( "Range of ("+lookback+")=" +  (lowBar-1) + "-" +String.Format( "{0:0.00}" ,Lows[ES1][lowBar-1]) + "," + (highBar-1) + "-" +String.Format( "{0:0.00}" ,Highs[ES1][highBar-1])) ;
              Print ( "Range of ("+lookback+")=" +  lowBar + "-" + String.Format( "{0:0.00}" ,Lows[ES1][lowBar]) + "," + highBar +"-"+ String.Format( "{0:0.00}" ,Highs[ES1][highBar])) ;
              Print ( "Range of ("+lookback+")=" +  (lowBar+1) + "-" +String.Format( "{0:0.00}" ,Lows[ES1][lowBar+1] )+ "," + (highBar+1) + "-" + String.Format( "{0:0.00}" ,Highs[ES1][highBar+1])) ;
              Print ( "          "+         "    " + String.Format( "{0:0.00}" ,realLow) +",  "+String.Format( "{0:0.00}" ,realHigh ));
              
              //Print ( "Difference is=" + String.Format( "{0:####.00}" ,( Highs[ES1][highBar] - Lows[ES1][lowBar]  )));
          
          }
          
          
      } // End OnBarUpdate()
              #region Properties
              [Description("")]
              [GridCategory("Parameters")]
              public int MyInput0
              {
                  get { return myInput0; }
                  set { myInput0 = Math.Max(1, value); }
              }
              #endregion
          }
      }

      Comment


        #4
        Today - realtime

        I ran this in real time today, NOT market replay. It is WRONG.

        The market was trending up with new highs on each bar, and the HIGHS was not updating.

        See it shows 1127.00 for 9:45, 9:42, 9:39, 9:36,9:33

        the 9:30am was the last down bar, and it did store that as the high.

        But as soon as the market up was up, it no longer stored the correct high. See image of 3 minute chart.



        [1]=1129.00 ,09/22 09:45:00 [ES][0]=1129.00 ,09/22 09:43:47 [ES1][0]=1129.00 ,09/22 09:45:00 Lows[ES1][0]=1128.75 Highs[ES1][0]=1127.00
        [1]=1129.75 ,09/22 09:42:00 [ES][1]=1129.50 ,09/22 09:43:07 [ES1][1]=1129.75 ,09/22 09:42:00 Lows[ES1][1]=1129.50 Highs[ES1][1]=1127.00
        [1]=1129.75 ,09/22 09:39:00 [ES][2]=1129.75 ,09/22 09:41:59 [ES1][2]=1129.75 ,09/22 09:39:00 Lows[ES1][2]=1128.00 Highs[ES1][2]=1127.00
        [1]=1128.50 ,09/22 09:36:00 [ES][3]=1130.50 ,09/22 09:41:34 [ES1][3]=1128.50 ,09/22 09:36:00 Lows[ES1][3]=1126.50 Highs[ES1][3]=1127.00
        [1]=1127.50 ,09/22 09:33:00 [ES][4]=1131.75 ,09/22 09:41:12 [ES1][4]=1127.50 ,09/22 09:33:00 Lows[ES1][4]=1126.25 Highs[ES1][4]=1127.00
        [1]=1126.25 ,09/22 09:30:00 [ES][5]=1132.00 ,09/22 09:40:16 [ES1][5]=1126.25 ,09/22 09:30:00 Lows[ES1][5]=1126.00 Highs[ES1][5]=1128.25
        Attached Files

        Comment


          #5
          Originally posted by sledge View Post
          I ran this in real time today, NOT market replay. It is WRONG.

          The market was trending up with new highs on each bar, and the HIGHS was not updating.

          See it shows 1127.00 for 9:45, 9:42, 9:39, 9:36,9:33

          the 9:30am was the last down bar, and it did store that as the high.

          But as soon as the market up was up, it no longer stored the correct high. See image of 3 minute chart.



          [1]=1129.00 ,09/22 09:45:00 [ES][0]=1129.00 ,09/22 09:43:47 [ES1][0]=1129.00 ,09/22 09:45:00 Lows[ES1][0]=1128.75 Highs[ES1][0]=1127.00
          [1]=1129.75 ,09/22 09:42:00 [ES][1]=1129.50 ,09/22 09:43:07 [ES1][1]=1129.75 ,09/22 09:42:00 Lows[ES1][1]=1129.50 Highs[ES1][1]=1127.00
          [1]=1129.75 ,09/22 09:39:00 [ES][2]=1129.75 ,09/22 09:41:59 [ES1][2]=1129.75 ,09/22 09:39:00 Lows[ES1][2]=1128.00 Highs[ES1][2]=1127.00
          [1]=1128.50 ,09/22 09:36:00 [ES][3]=1130.50 ,09/22 09:41:34 [ES1][3]=1128.50 ,09/22 09:36:00 Lows[ES1][3]=1126.50 Highs[ES1][3]=1127.00
          [1]=1127.50 ,09/22 09:33:00 [ES][4]=1131.75 ,09/22 09:41:12 [ES1][4]=1127.50 ,09/22 09:33:00 Lows[ES1][4]=1126.25 Highs[ES1][4]=1127.00
          [1]=1126.25 ,09/22 09:30:00 [ES][5]=1132.00 ,09/22 09:40:16 [ES1][5]=1126.25 ,09/22 09:30:00 Lows[ES1][5]=1126.00 Highs[ES1][5]=1128.25
          Sledge, I copied your code into a strategy. This is what I got. When I checked it, it looked correct to me. Primary series is a Range4 on /ES. Naturally, I had to disable the time filter so that I can test at this time.

          CurrentBar: 1946
          -------------------------------------------------------------------------------------------------------------------------------------------------
          [1]=1132.00 ,09/22 22:21:00 [ES][0]=1132.00 ,09/22 22:20:49 [ES1][0]=1132.00 ,09/22 22:21:00 Lows[ES1][0]=1130.75 Highs[ES1][0]=1129.50 ZLEMA[ES1][0]=1132.00
          [1]=1131.00 ,09/22 22:18:00 [ES][1]=1131.75 ,09/22 22:20:11 [ES1][1]=1131.00 ,09/22 22:18:00 Lows[ES1][1]=1126.75 Highs[ES1][1]=1131.00 ZLEMA[ES1][1]=1131.00
          [1]=1127.00 ,09/22 22:15:00 [ES][2]=1131.00 ,09/22 22:18:09 [ES1][2]=1127.00 ,09/22 22:15:00 Lows[ES1][2]=1126.00 Highs[ES1][2]=1127.50 ZLEMA[ES1][2]=1127.00
          [1]=1126.25 ,09/22 22:12:00 [ES][3]=1130.00 ,09/22 22:17:40 [ES1][3]=1126.25 ,09/22 22:12:00 Lows[ES1][3]=1124.50 Highs[ES1][3]=1126.25
          [1]=1125.00 ,09/22 22:09:00 [ES][4]=1129.25 ,09/22 22:16:52 [ES1][4]=1125.00 ,09/22 22:09:00 Lows[ES1][4]=1124.75 Highs[ES1][4]=1128.00
          [1]=1127.75 ,09/22 22:06:00 [ES][5]=1128.50 ,09/22 22:16:18 [ES1][5]=1127.75 ,09/22 22:06:00 Lows[ES1][5]=1127.75 Highs[ES1][5]=1130.00
          [1]=1130.25 ,09/22 22:03:00 [ES][6]=1127.75 ,09/22 22:15:49 [ES1][6]=1130.25 ,09/22 22:03:00 Lows[ES1][6]=1127.50 Highs[ES1][6]=1130.75
          LowestBar(10)=4 HighestBar(10)=0 Bars.BarsSinceSession = 106 lookback=10
          Range of (10)=3-1124.50,-1-1129.50
          Range of (10)=4-1124.75,0-1129.50
          Range of (10)=5-1127.75,1-1131.00
          1129.00, 1132.50

          Comment


            #6
            Originally posted by koganam View Post
            Sledge, I copied your code into a strategy. This is what I got. When I checked it, it looked correct to me. Primary series is a Range4 on /ES. Naturally, I had to disable the time filter so that I can test at this time.

            CurrentBar: 1946
            -------------------------------------------------------------------------------------------------------------------------------------------------
            [1]=1132.00 ,09/22 22:21:00 [ES][0]=1132.00 ,09/22 22:20:49 [ES1][0]=1132.00 ,09/22 22:21:00 Lows[ES1][0]=1130.75 Highs[ES1][0]=1129.50 ZLEMA[ES1][0]=1132.00
            [1]=1131.00 ,09/22 22:18:00 [ES][1]=1131.75 ,09/22 22:20:11 [ES1][1]=1131.00 ,09/22 22:18:00 Lows[ES1][1]=1126.75 Highs[ES1][1]=1131.00 ZLEMA[ES1][1]=1131.00
            [1]=1127.00 ,09/22 22:15:00 [ES][2]=1131.00 ,09/22 22:18:09 [ES1][2]=1127.00 ,09/22 22:15:00 Lows[ES1][2]=1126.00 Highs[ES1][2]=1127.50 ZLEMA[ES1][2]=1127.00
            [1]=1126.25 ,09/22 22:12:00 [ES][3]=1130.00 ,09/22 22:17:40 [ES1][3]=1126.25 ,09/22 22:12:00 Lows[ES1][3]=1124.50 Highs[ES1][3]=1126.25
            [1]=1125.00 ,09/22 22:09:00 [ES][4]=1129.25 ,09/22 22:16:52 [ES1][4]=1125.00 ,09/22 22:09:00 Lows[ES1][4]=1124.75 Highs[ES1][4]=1128.00
            [1]=1127.75 ,09/22 22:06:00 [ES][5]=1128.50 ,09/22 22:16:18 [ES1][5]=1127.75 ,09/22 22:06:00 Lows[ES1][5]=1127.75 Highs[ES1][5]=1130.00
            [1]=1130.25 ,09/22 22:03:00 [ES][6]=1127.75 ,09/22 22:15:49 [ES1][6]=1130.25 ,09/22 22:03:00 Lows[ES1][6]=1127.50 Highs[ES1][6]=1130.75
            LowestBar(10)=4 HighestBar(10)=0 Bars.BarsSinceSession = 106 lookback=10
            Range of (10)=3-1124.50,-1-1129.50
            Range of (10)=4-1124.75,0-1129.50
            Range of (10)=5-1127.75,1-1131.00
            1129.00, 1132.50
            on my 3 min chart,

            1)22:18:00 Lows[ES1][0]=1130.75 Highs[ES1][0]=1129.50 ???? 1130.75 < 1129.50??
            2) 22:18:00 Lows[ES1][1]=1126.75 Highs[ES1][1]=1131.00 ok
            3) 22:15:00 Lows[ES1][2]=1126.00 Highs[ES1][2]=1127.50 ok
            4) 22:12:00 Lows[ES1][3]=1124.50 Highs[ES1][3]=1126.25 ok
            5) 22:09:00 Lows[ES1][4]=1124.75 Highs[ES1][4]=1128.00 ok
            6) 22:06:00 Lows[ES1][5]=1127.75 Highs[ES1][5]=1130.00 ok
            7) 22:03:00 Lows[ES1][6]=1127.50 Highs[ES1][6]=1130.75 ok

            I will run market replay for 22:00 - 22:18 and report

            I am on Vista 32 bit, nt 7.1000.0.7.
            Attached Files

            Comment


              #7
              Honest to God, I disconnect, removed my time filter, started Market replay, no output/ultra slow at 500x (ie 1 second took over a minute and did nothing).
              restarted NT

              same thing.

              I'm going to reboot and reconnect, and run this tomorrow on 3 minute ES with 3 minute ES1 added during live session.

              i've spent 20 minutes trying to run this in replay, it's time for some zzzz

              Comment


                #8
                I can not for the life of me reproduce any of this today in Market Replay.

                I had suggested to me that possible problems were:
                1) range bars with 3 minute attach ES 12-11
                2) different sessions (originally, i was using ES with a ^index from TDA which has a different session template)

                On Friday I did 1 minute ES 12-11 with 3 minute ES 12-11 attached. that worked.
                Tested that on 9/22 problem. that worked.

                Now I tested range bars with ES 12-11 - working as expected.
                And range bars with ^index from TDA is working with different session template is working.

                Those values aren't repeating or being left off.

                It was also suggested I that I change these line (THANKS ZACH!)

                Code:
                        lowBar  = LowestBar (BarsArray[ES1],lookback);
                        highBar = HighestBar(BarsArray[ES1],lookback);
                to:
                Code:
                        
                        lowBar  = LowestBar (Lows[ES1],lookback);
                        highBar = HighestBar(Highs[ES1],lookback);
                Since I want to Lows/Highs, not the Close of the bar.

                There maybe something MORE involved like with - disconnecting from a live session, and then going to market replay, without restarting ninjatrader (that's what I did when these things were happening.) I will test that theory out next week.

                So yes, I'm a little worried that i can't reproduce what happened in market replay, because I won't know when these issues can occur. I'll have to keep an eye out for the problem, and maybe save this as something to test.
                Last edited by sledge; 09-24-2011, 10:13 AM. Reason: correct Zach's name

                Comment


                  #9
                  sledge, if you are ever able to reproduce this issue, please let us know how.
                  AustinNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  656 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  371 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  109 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  574 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  579 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X