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

Extra bars in Strategy included in calculations, but not NT chart

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

    Extra bars in Strategy included in calculations, but not NT chart

    windows vista 32, nt 7.0.1000.2


    The bold and italics,are in my strategy code, and affect my early morning SMA's, EMA's, until they "roll off". TRIN is 9:30 am -> ?? ..

    my chart's session template (primary attached with strategy and my TRIN chart use <Use instrument settings> ).

    And I have verified in my TRIN chart that 1.33 was todays OPEN/HIGH,
    9:39 pm on 2/8 - no idea.. and I guess 4:03-4:09 do happen, but don't show on my chart, and my CHART's SMA/EMA for trin don't take it into consideration.


    I'd like to exclude 4:03 to 9:30 am since they don't make sense to me in SMA/EMA calculations,and then my strategy would match my NT charts 100% .

    Is there a session template for strategies?


    Add("^TRIN", PeriodType.Minute, 3);






    ^TRIN Closes[TRIN][0] =1 Time[0]=2/9/2011 9:39:00 AM
    ^TRIN Closes[TRIN][1] =0.99 Time[1]=2/9/2011 9:36:00 AM
    ^TRIN Closes[TRIN][2] =0.9 Time[2]=2/9/2011 9:33:00 AM
    ^TRIN Closes[TRIN][3] =1.32 Time[3]=2/9/2011 9:30:00 AM
    ^TRIN Closes[TRIN][4] =0.98 Time[4]=2/8/2011 9:39:00 PM
    ^TRIN Closes[TRIN][5] =0.98 Time[5]=2/8/2011 4:09:00 PM
    ^TRIN Closes[TRIN][6] =0.97 Time[6]=2/8/2011 4:06:00 PM
    ^TRIN Closes[TRIN][7] =0.94 Time[7]=2/8/2011 4:03:00 PM

    ^TRIN Closes[TRIN][8] =0.93 Time[8]=2/8/2011 4:00:00 PM
    ^TRIN Closes[TRIN][9] =0.78 Time[9]=2/8/2011 3:57:00 PM
    ^TRIN Closes[TRIN][10]=0.68 Time[10]=2/8/2011 3:54:00 PM
    ^TRIN Closes[TRIN][11]=0.93 Time[11]=2/8/2011 3:51:00 PM
    ^TRIN Closes[TRIN][12]=0.91 Time[12]=2/8/2011 3:48:00 PM
    ^TRIN Closes[TRIN][13]=0.89 Time[13]=2/8/2011 3:45:00 PM
    ^TRIN Closes[TRIN][14]=0.87 Time[14]=2/8/2011 3:42:00 PM
    ^TRIN Closes[TRIN][15]=0.93 Time[15]=2/8/2011 3:39:00 PM
    Attached Files
    Last edited by sledge; 02-09-2011, 08:53 PM.

    #2
    sledge, the Add()ed series in the strategy should use the template set for the primary series - you've added the strategy from the chart, correct? What template is your TRIN master instrument set to in the Instrument Manager?

    Thanks,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      sledge, the Add()ed series in the strategy should use the template set for the primary series - you've added the strategy from the chart, correct? What template is your TRIN master instrument set to in the Instrument Manager?

      Thanks,
      main instrument ES , CME US Index Futures ETH
      TRIN US Equities RTH

      Comment


        #4
        sledge,

        To clarify your setup, is TRIN on the chart you are applying your script to?

        Here is a snippet from the Help Guide regarding multi-series strategies:

        "If a multi-series script adds an additional Bars object that already exists on the chart, the script will use the preexisting series instead of creating a new one to conserve memory. This includes that series' session template as applied from the chart. If the Bars object does not exist on the chart, the session template of the added Bars object will be the default one set for that instrument in the Instrument Manager and not the session template of the primary Bars object."
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          sledge,

          To clarify your setup, is TRIN on the chart you are applying your script to?

          Here is a snippet from the Help Guide regarding multi-series strategies:

          "If a multi-series script adds an additional Bars object that already exists on the chart, the script will use the preexisting series instead of creating a new one to conserve memory. This includes that series' session template as applied from the chart. If the Bars object does not exist on the chart, the session template of the added Bars object will be the default one set for that instrument in the Instrument Manager and not the session template of the primary Bars object."
          No, $TRIN is NOT on my ES Chart.

          When I switch things up, and apply the strategy to the TRIN chart which has US Equities RTH setting.. you can still see the difference.


          When BarsInProgress = 0 (the chart):

          Close[0] =0.96 Time[0]=2/9/2011 9:45:00 AM
          Close[1] =0.98 Time[1]=2/9/2011 9:42:00 AM
          Close[2] =1.03 Time[2]=2/9/2011 9:39:00 AM
          Close[3] =0.99 Time[3]=2/9/2011 9:36:00 AM
          Close[4] =0.9 Time[4]=2/9/2011 9:33:00 AM
          Close[5] =0.93 Time[5]=2/8/2011 4:00:00 PM
          Close[6] =0.78 Time[6]=2/8/2011 3:57:00 PM
          Close[7] =0.68 Time[7]=2/8/2011 3:54:00 PM
          Close[8] =0.93 Time[8]=2/8/2011 3:51:00 PM
          Close[9] =0.91 Time[9]=2/8/2011 3:48:00 PM
          Close[10]=0.89 Time[10]=2/8/2011 3:45:00 PM
          Close[11]=0.87 Time[11]=2/8/2011 3:42:00 PM
          Close[12]=0.93 Time[12]=2/8/2011 3:39:00 PM
          Close[13]=0.79 Time[13]=2/8/2011 3:36:00 PM
          Close[14]=0.79 Time[14]=2/8/2011 3:33:00 PM
          Close[15]=0.8 Time[15]=2/8/2011 3:30:00 PM
          Closes[0][0] =0.96 Times[0][0]=2/9/2011 9:45:00 AM
          Closes[0][1] =0.98 Times[0][1]=2/9/2011 9:42:00 AM
          Closes[0][2] =1.03 Times[0][2]=2/9/2011 9:39:00 AM
          Closes[0][3] =0.99 Times[0][3]=2/9/2011 9:36:00 AM
          Closes[0][4] =0.9 Times[0][4]=2/9/2011 9:33:00 AM
          Closes[0][5] =0.93 Times[0][5]=2/8/2011 4:00:00 PM
          Closes[0][6] =0.78 Times[0][6]=2/8/2011 3:57:00 PM
          Closes[0][7] =0.68 Times[0][7]=2/8/2011 3:54:00 PM
          Closes[0][8] =0.93 Times[0][8]=2/8/2011 3:51:00 PM
          Closes[0][9] =0.91 Times[0][9]=2/8/2011 3:48:00 PM
          Closes[0][10]=0.89 Times[0][10]=2/8/2011 3:45:00 PM
          Closes[0][11]=0.87 Times[0][11]=2/8/2011 3:42:00 PM
          Closes[0][12]=0.93 Times[0][12]=2/8/2011 3:39:00 PM
          Closes[0][13]=0.79 Times[0][13]=2/8/2011 3:36:00 PM
          Closes[0][14]=0.79 Times[0][14]=2/8/2011 3:33:00 PM
          Closes[0][15]=0.8 Times[0][15]=2/8/2011 3:30:00 PM
          ^TRIN Closes[TRIN][0] =0.96 Times[TRIN][0]=2/9/2011 9:45:00 AM
          ^TRIN Closes[TRIN][1] =0.98 Times[TRIN][1]=2/9/2011 9:42:00 AM
          ^TRIN Closes[TRIN][2] =1.03 Times[TRIN][2]=2/9/2011 9:39:00 AM
          ^TRIN Closes[TRIN][3] =0.99 Times[TRIN][3]=2/9/2011 9:36:00 AM
          ^TRIN Closes[TRIN][4] =0.9 Times[TRIN][4]=2/9/2011 9:33:00 AM
          ^TRIN Closes[TRIN][5] =1.32 Times[TRIN][5]=2/9/2011 9:30:00 AM
          ^TRIN Closes[TRIN][6] =0.98 Times[TRIN][6]=2/8/2011 9:39:00 PM
          ^TRIN Closes[TRIN][7] =0.98 Times[TRIN][7]=2/8/2011 4:09:00 PM
          ^TRIN Closes[TRIN][8] =0.97 Times[TRIN][8]=2/8/2011 4:06:00 PM
          ^TRIN Closes[TRIN][9] =0.94 Times[TRIN][9]=2/8/2011 4:03:00 PM

          ^TRIN Closes[TRIN][10]=0.93 Times[TRIN][10]=2/8/2011 4:00:00 PM
          ^TRIN Closes[TRIN][11]=0.78 Times[TRIN][11]=2/8/2011 3:57:00 PM
          ^TRIN Closes[TRIN][12]=0.68 Times[TRIN][12]=2/8/2011 3:54:00 PM
          ^TRIN Closes[TRIN][13]=0.93 Times[TRIN][13]=2/8/2011 3:51:00 PM
          ^TRIN Closes[TRIN][14]=0.91 Times[TRIN][14]=2/8/2011 3:48:00 PM
          ^TRIN Closes[TRIN][15]=0.89 Times[TRIN][15]=2/8/2011 3:45:00 PM


          When BarsInProgress = 3

          Close[0] =0.96 Time[0]=2/9/2011 9:45:00 AM
          Close[1] =0.98 Time[1]=2/9/2011 9:42:00 AM
          Close[2] =1.03 Time[2]=2/9/2011 9:39:00 AM
          Close[3] =0.99 Time[3]=2/9/2011 9:36:00 AM
          Close[4] =0.9 Time[4]=2/9/2011 9:33:00 AM
          Close[5] =1.32 Time[5]=2/9/2011 9:30:00 AM
          Close[6] =0.98 Time[6]=2/8/2011 9:39:00 PM
          Close[7] =0.98 Time[7]=2/8/2011 4:09:00 PM
          Close[8] =0.97 Time[8]=2/8/2011 4:06:00 PM
          Close[9] =0.94 Time[9]=2/8/2011 4:03:00 PM

          Close[10]=0.93 Time[10]=2/8/2011 4:00:00 PM
          Close[11]=0.78 Time[11]=2/8/2011 3:57:00 PM
          Close[12]=0.68 Time[12]=2/8/2011 3:54:00 PM
          Close[13]=0.93 Time[13]=2/8/2011 3:51:00 PM
          Close[14]=0.91 Time[14]=2/8/2011 3:48:00 PM
          Close[15]=0.89 Time[15]=2/8/2011 3:45:00 PM
          Closes[0][0] =0.96 Times[0][0]=2/9/2011 9:45:00 AM
          Closes[0][1] =0.98 Times[0][1]=2/9/2011 9:42:00 AM
          Closes[0][2] =1.03 Times[0][2]=2/9/2011 9:39:00 AM
          Closes[0][3] =0.99 Times[0][3]=2/9/2011 9:36:00 AM
          Closes[0][4] =0.9 Times[0][4]=2/9/2011 9:33:00 AM
          Closes[0][5] =0.93 Times[0][5]=2/8/2011 4:00:00 PM
          Closes[0][6] =0.78 Times[0][6]=2/8/2011 3:57:00 PM
          Closes[0][7] =0.68 Times[0][7]=2/8/2011 3:54:00 PM
          Closes[0][8] =0.93 Times[0][8]=2/8/2011 3:51:00 PM
          Closes[0][9] =0.91 Times[0][9]=2/8/2011 3:48:00 PM
          Closes[0][10]=0.89 Times[0][10]=2/8/2011 3:45:00 PM
          Closes[0][11]=0.87 Times[0][11]=2/8/2011 3:42:00 PM
          Closes[0][12]=0.93 Times[0][12]=2/8/2011 3:39:00 PM
          Closes[0][13]=0.79 Times[0][13]=2/8/2011 3:36:00 PM
          Closes[0][14]=0.79 Times[0][14]=2/8/2011 3:33:00 PM
          Closes[0][15]=0.8 Times[0][15]=2/8/2011 3:30:00 PM
          ^TRIN Closes[TRIN][0] =0.96 Times[TRIN][0]=2/9/2011 9:45:00 AM
          ^TRIN Closes[TRIN][1] =0.98 Times[TRIN][1]=2/9/2011 9:42:00 AM
          ^TRIN Closes[TRIN][2] =1.03 Times[TRIN][2]=2/9/2011 9:39:00 AM
          ^TRIN Closes[TRIN][3] =0.99 Times[TRIN][3]=2/9/2011 9:36:00 AM
          ^TRIN Closes[TRIN][4] =0.9 Times[TRIN][4]=2/9/2011 9:33:00 AM
          ^TRIN Closes[TRIN][5] =1.32 Times[TRIN][5]=2/9/2011 9:30:00 AM
          ^TRIN Closes[TRIN][6] =0.98 Times[TRIN][6]=2/8/2011 9:39:00 PM
          ^TRIN Closes[TRIN][7] =0.98 Times[TRIN][7]=2/8/2011 4:09:00 PM
          ^TRIN Closes[TRIN][8] =0.97 Times[TRIN][8]=2/8/2011 4:06:00 PM
          ^TRIN Closes[TRIN][9] =0.94 Times[TRIN][9]=2/8/2011 4:03:00 PM

          ^TRIN Closes[TRIN][10]=0.93 Times[TRIN][10]=2/8/2011 4:00:00 PM
          ^TRIN Closes[TRIN][11]=0.78 Times[TRIN][11]=2/8/2011 3:57:00 PM
          ^TRIN Closes[TRIN][12]=0.68 Times[TRIN][12]=2/8/2011 3:54:00 PM
          ^TRIN Closes[TRIN][13]=0.93 Times[TRIN][13]=2/8/2011 3:51:00 PM
          ^TRIN Closes[TRIN][14]=0.91 Times[TRIN][14]=2/8/2011 3:48:00 PM
          ^TRIN Closes[TRIN][15]=0.89 Times[TRIN][15]=2/8/2011 3:45:00 PM
          Last edited by sledge; 02-10-2011, 06:15 PM. Reason: confussed eth with rth

          Comment


            #6
            sledge, please try then setting both the ES and TRIN default session to the needed RTH hours in the Instrument Manager - if you then start the script on either series - would you still see 'out of RTH range' timestamps being printed?

            Thanks,
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Bertrand View Post
              sledge, please try then setting both the ES and TRIN default session to the needed RTH hours in the Instrument Manager - if you then start the script on either series - would you still see 'out of RTH range' timestamps being printed?

              Thanks,
              YES. Only when I changed the chart manually did it finally 'work'. See below.

              tools->instrument mgr->edit TRIN->session template-> CME US Index Futures RTH
              tools->instrument mgr->edit ES->session template-> CME US Index Futures RTH
              chart ->data->session template-> <use default settings>

              FAIL. Strategy saw the extra bars on TRIN.

              ES chart->data->session template->CME US Index Futures RTH

              Pass.


              ES chart->data->session template->CME US Index Futures ETH

              FAIL.

              ^TRIN Closes[TRIN][1] =1.03 Times[TRIN][1]=2/10/2011 9:33:00 AM
              ^TRIN Closes[TRIN][2] =1.02 Times[TRIN][2]=2/10/2011 7:51:00 AM
              ^TRIN Closes[TRIN][3] =1.02 Times[TRIN][3]=2/9/2011 6:18:00 PM
              ^TRIN Closes[TRIN][4] =1.02 Times[TRIN][4]=2/9/2011 4:06:00 PM
              ^TRIN Closes[TRIN][5] =1.01 Times[TRIN][5]=2/9/2011 4:03:00 PM

              ^TRIN Closes[TRIN][6] =0.98 Times[TRIN][6]=2/9/2011 4:00:00 PM


              Same thing when I applied the strategy to my TRIN chart.

              tools->instrument mgr->edit TRIN->session template-> CME US Index Futures RTH (never changed)
              TRIN -> chart->data->session template-> <use default settings>


              FAIL.Strategy saw the extra bars on TRIN.

              TRIN chart->data->session template->US Equities RTH

              Pass. Everything was as expected.
              Last edited by sledge; 02-11-2011, 06:21 PM. Reason: 1 more test case added

              Comment


                #8
                Hello,

                Thank you for your forum post.

                Just wanted to let you know that we received your note and that someone will respond on Monday.

                Thank You for your Patience.

                Comment


                  #9
                  sledge, I tried to reproduce here, but when I set ES on the RTH session per default and then ran the strategy on ES 1 min 'use instrument settings' the TRIN values would only be showing up for US Equities RTH session hours the ^TRIN index would use per default, so there were no prints for the extra 15 min the ES would trade in this example after ^TRIN had closed @1600 EST.
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    Originally posted by NinjaTrader_Bertrand View Post
                    sledge, I tried to reproduce here, but when I set ES on the RTH session per default and then ran the strategy on ES 1 min 'use instrument settings' the TRIN values would only be showing up for US Equities RTH session hours the ^TRIN index would use per default, so there were no prints for the extra 15 min the ES would trade in this example after ^TRIN had closed @1600 EST.
                    Was that CME US index Futures RTH or US Equities RTH?

                    You surely know CME RTF goes to 3:15pm CST, US Equities RTH to 4:00pm EST..


                    And if you make ES ETH in either case, CME or US Equities, do you get the extra after hours?

                    Locking everything down to US Equities RTH "solves" the issue, but I want 24x hour CBOE ETH for ES, and US Equities RTH for TRIN.

                    Comment


                      #11
                      Correct, I was using the CME RTH in CST for the ES and the US Equities RTH in EST for the Trin symbol in this test outlined.

                      For example here's my test using ES on ETH and adding TRIN 'sitting' on the regular cash RTH hours -

                      ES BIP0 2/15/2011 9:00:00 AM
                      ES BIP0 2/15/2011 9:05:00 AM
                      ES BIP0 2/15/2011 9:10:00 AM
                      ES BIP0 2/15/2011 9:15:00 AM
                      ES BIP0 2/15/2011 9:20:00 AM
                      ES BIP0 2/15/2011 9:25:00 AM
                      ES BIP0 2/15/2011 9:30:00 AM
                      ES BIP0 2/15/2011 9:35:00 AM
                      TRIN BIP1 2/15/2011 9:35:00 AM
                      ES BIP0 2/15/2011 9:40:00 AM

                      In ETH > I see only ES prints

                      In RTH - I see both Print
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        Here are my exact steps:

                        I basically record 24x7. As TRIN is something that has to be recorded from my understanding to chart.

                        1) Set TRIN Session Template to US EQUITIES ETH
                        2) Look at 1 minute trin chart, verify after hours.
                        See attachment ^TRIN (1 Min) 2_14_2011.jpg (28.8 KB)

                        3) Set TRIN to US EQUITIES RTH.
                        4) Create new chart to verify
                        See attachment ^TRIN (1 Min) 2_14_2011-2.jpg (18.2 KB)

                        5) Verify ES Session Template = CME US INDEX FUTURES ETH
                        6) Create 1 minute ES 03-11 chart. Session Template = <Use Instrument Settings>

                        6) Set Market Replay to before 9:30.
                        7) Load Strategy MCS1 onto chart.

                        See Strategy Attachment: MCS1.cs (5.3 KB)
                        *Note adding ES03-11 wasn't necessary and has no effect when removed.
                        (need to adjust static int variable TRIN).

                        9) Fast Forward to 9:30 and view output.


                        -------------------------------------------------------------------------------------------------------------------
                        BarsInProgress = 0
                        Close[0] =1326 Time[0]=2/14/2011 9:30:00 AM Closes[0][0] =1326 Times[0][0]=2/14/2011 9:30:00 AM ^TRIN Closes[TRIN][0] =1.1 Times[TRIN][0]=2/14/2011 7:00:00 AM
                        Close[1] =1326 Time[1]=2/14/2011 9:29:00 AM Closes[0][1] =1326 Times[0][1]=2/14/2011 9:29:00 AM ^TRIN Closes[TRIN][1] =1.1 Times[TRIN][1]=2/11/2011 4:06:00 PM
                        Close[2] =1326.25 Time[2]=2/14/2011 9:28:00 AM Closes[0][2] =1326.25 Times[0][2]=2/14/2011 9:28:00 AM ^TRIN Closes[TRIN][2] =1.09 Times[TRIN][2]=2/11/2011 4:04:00 PM
                        Close[3] =1326.25 Time[3]=2/14/2011 9:27:00 AM Closes[0][3] =1326.25 Times[0][3]=2/14/2011 9:27:00 AM ^TRIN Closes[TRIN][3] =1.08 Times[TRIN][3]=2/11/2011 4:03:00 PM
                        Close[4] =1326.25 Time[4]=2/14/2011 9:26:00 AM Closes[0][4] =1326.25 Times[0][4]=2/14/2011 9:26:00 AM ^TRIN Closes[TRIN][4] =1.07 Times[TRIN][4]=2/11/2011 4:02:00 PM
                        Close[5] =1326.5 Time[5]=2/14/2011 9:25:00 AM Closes[0][5] =1326.5 Times[0][5]=2/14/2011 9:25:00 AM ^TRIN Closes[TRIN][5] =1.06 Times[TRIN][5]=2/11/2011 4:01:00 PM
                        Close[6] =1326.25 Time[6]=2/14/2011 9:24:00 AM Closes[0][6] =1326.25 Times[0][6]=2/14/2011 9:24:00 AM ^TRIN Closes[TRIN][6] =1.06 Times[TRIN][6]=2/11/2011 4:00:00 PM
                        Close[7] =1326.25 Time[7]=2/14/2011 9:23:00 AM Closes[0][7] =1326.25 Times[0][7]=2/14/2011 9:23:00 AM ^TRIN Closes[TRIN][7] =1.13 Times[TRIN][7]=2/11/2011 3:59:00 PM
                        Close[8] =1326.5 Time[8]=2/14/2011 9:22:00 AM Closes[0][8] =1326.5 Times[0][8]=2/14/2011 9:22:00 AM ^TRIN Closes[TRIN][8] =1.13 Times[TRIN][8]=2/11/2011 3:58:00 PM
                        Close[9] =1326.5 Time[9]=2/14/2011 9:21:00 AM Closes[0][9] =1326.5 Times[0][9]=2/14/2011 9:21:00 AM ^TRIN Closes[TRIN][9] =1.14 Times[TRIN][9]=2/11/2011 3:57:00 PM
                        -------------------------------------------------------------------------------------------------------------------
                        BarsInProgress = 1
                        Close[0] =1326 Time[0]=2/14/2011 9:30:00 AM Closes[0][0] =1326 Times[0][0]=2/14/2011 9:30:00 AM ^TRIN Closes[TRIN][0] =1.1 Times[TRIN][0]=2/14/2011 7:00:00 AM
                        Close[1] =1326 Time[1]=2/14/2011 9:29:00 AM Closes[0][1] =1326 Times[0][1]=2/14/2011 9:29:00 AM ^TRIN Closes[TRIN][1] =1.1 Times[TRIN][1]=2/11/2011 4:06:00 PM
                        Close[2] =1326.25 Time[2]=2/14/2011 9:28:00 AM Closes[0][2] =1326.25 Times[0][2]=2/14/2011 9:28:00 AM ^TRIN Closes[TRIN][2] =1.09 Times[TRIN][2]=2/11/2011 4:04:00 PM
                        Close[3] =1326.25 Time[3]=2/14/2011 9:27:00 AM Closes[0][3] =1326.25 Times[0][3]=2/14/2011 9:27:00 AM ^TRIN Closes[TRIN][3] =1.08 Times[TRIN][3]=2/11/2011 4:03:00 PM
                        Close[4] =1326.25 Time[4]=2/14/2011 9:26:00 AM Closes[0][4] =1326.25 Times[0][4]=2/14/2011 9:26:00 AM ^TRIN Closes[TRIN][4] =1.07 Times[TRIN][4]=2/11/2011 4:02:00 PM
                        Close[5] =1326.5 Time[5]=2/14/2011 9:25:00 AM Closes[0][5] =1326.5 Times[0][5]=2/14/2011 9:25:00 AM ^TRIN Closes[TRIN][5] =1.06 Times[TRIN][5]=2/11/2011 4:01:00 PM
                        Close[6] =1326.25 Time[6]=2/14/2011 9:24:00 AM Closes[0][6] =1326.25 Times[0][6]=2/14/2011 9:24:00 AM ^TRIN Closes[TRIN][6] =1.06 Times[TRIN][6]=2/11/2011 4:00:00 PM
                        Close[7] =1326.25 Time[7]=2/14/2011 9:23:00 AM Closes[0][7] =1326.25 Times[0][7]=2/14/2011 9:23:00 AM ^TRIN Closes[TRIN][7] =1.13 Times[TRIN][7]=2/11/2011 3:59:00 PM
                        Close[8] =1326.5 Time[8]=2/14/2011 9:22:00 AM Closes[0][8] =1326.5 Times[0][8]=2/14/2011 9:22:00 AM ^TRIN Closes[TRIN][8] =1.13 Times[TRIN][8]=2/11/2011 3:58:00 PM
                        Close[9] =1326.5 Time[9]=2/14/2011 9:21:00 AM Closes[0][9] =1326.5 Times[0][9]=2/14/2011 9:21:00 AM ^TRIN Closes[TRIN][9] =1.14 Times[TRIN][9]=2/11/2011 3:57:00 PM
                        -------------------------------------------------------------------------------------------------------------------
                        BarsInProgress = 2
                        Close[0] =0.45 Time[0]=2/14/2011 9:30:00 AM Closes[0][0] =1326 Times[0][0]=2/14/2011 9:30:00 AM ^TRIN Closes[TRIN][0] =0.45 Times[TRIN][0]=2/14/2011 9:30:00 AM
                        Close[1] =1.1 Time[1]=2/14/2011 7:00:00 AM Closes[0][1] =1326 Times[0][1]=2/14/2011 9:29:00 AM ^TRIN Closes[TRIN][1] =1.1 Times[TRIN][1]=2/14/2011 7:00:00 AM
                        Close[2] =1.1 Time[2]=2/11/2011 4:06:00 PM Closes[0][2] =1326.25 Times[0][2]=2/14/2011 9:28:00 AM ^TRIN Closes[TRIN][2] =1.1 Times[TRIN][2]=2/11/2011 4:06:00 PM
                        Close[3] =1.09 Time[3]=2/11/2011 4:04:00 PM Closes[0][3] =1326.25 Times[0][3]=2/14/2011 9:27:00 AM ^TRIN Closes[TRIN][3] =1.09 Times[TRIN][3]=2/11/2011 4:04:00 PM
                        Close[4] =1.08 Time[4]=2/11/2011 4:03:00 PM Closes[0][4] =1326.25 Times[0][4]=2/14/2011 9:26:00 AM ^TRIN Closes[TRIN][4] =1.08 Times[TRIN][4]=2/11/2011 4:03:00 PM
                        Close[5] =1.07 Time[5]=2/11/2011 4:02:00 PM Closes[0][5] =1326.5 Times[0][5]=2/14/2011 9:25:00 AM ^TRIN Closes[TRIN][5] =1.07 Times[TRIN][5]=2/11/2011 4:02:00 PM
                        Close[6] =1.06 Time[6]=2/11/2011 4:01:00 PM Closes[0][6] =1326.25 Times[0][6]=2/14/2011 9:24:00 AM ^TRIN Closes[TRIN][6] =1.06 Times[TRIN][6]=2/11/2011 4:01:00 PM
                        Close[7] =1.06 Time[7]=2/11/2011 4:00:00 PM Closes[0][7] =1326.25 Times[0][7]=2/14/2011 9:23:00 AM ^TRIN Closes[TRIN][7] =1.06 Times[TRIN][7]=2/11/2011 4:00:00 PM
                        Close[8] =1.13 Time[8]=2/11/2011 3:59:00 PM Closes[0][8] =1326.5 Times[0][8]=2/14/2011 9:22:00 AM ^TRIN Closes[TRIN][8] =1.13 Times[TRIN][8]=2/11/2011 3:59:00 PM
                        Close[9] =1.13 Time[9]=2/11/2011 3:58:00 PM Closes[0][9] =1326.5 Times[0][9]=2/14/2011 9:21:00 AM ^TRIN Closes[TRIN][9] =1.13 Times[TRIN][9]=2/11/2011 3:58:00 PM

                        Attached Files

                        Comment


                          #13
                          Thanks for the detailed steps - would you also see this phenomenon if you remove the unneeded second ES series add and then refer to TRIN with Times[1][0]?
                          BertrandNinjaTrader Customer Service

                          Comment


                            #14
                            Originally posted by NinjaTrader_Bertrand View Post
                            Thanks for the detailed steps - would you also see this phenomenon if you remove the unneeded second ES series add and then refer to TRIN with Times[1][0]?
                            I stand some what corrected.

                            I thought I had removed ES 03-11 in all my testing at some point.

                            Removing it did solve the problem. I even added VIX in, and both TRIN & VIX kept their places, respecting the RTH boundaries.

                            But.....

                            Adding DX 03-11 in place of ES03-11 throws everything off.

                            Code:
                                        Add("DX 03-11", PeriodType.Minute, 1);
                                        Add("^VIX",    PeriodType.Minute, 1);  
                                        Add("^TRIN",    PeriodType.Minute, 1);
                            I moved DX 03-11 (set up as CBOE ETH), to the last thing I've added.

                            Code:
                                        Add("^VIX",    PeriodType.Minute, 1);  
                                        Add("^TRIN",    PeriodType.Minute, 1);  
                                        Add("DX 03-11", PeriodType.Minute, 1);
                            This violates that rule of 'using the default instrument setting' as it is using the US Equities RTH.

                            I even added 2 DX 03-11's, and the last one did NOT flip to 24 hour.

                            Code:
                                        Add("^VIX",    PeriodType.Minute, 1);  
                                        Add("^TRIN",    PeriodType.Minute, 1);  
                                        Add("DX 03-11", PeriodType.Minute, 1);
                                        Add("DX 03-11", PeriodType.Minute, 1);
                            I've got my VIX/TRIN problem solved, but DX is not.

                            Comment


                              #15
                              sledge, thanks for providing the additional testing scenario here, I'll give it a run and check it out.
                              BertrandNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by bc24fl, 08-30-2019, 01:58 PM
                              4 responses
                              259 views
                              0 likes
                              Last Post PaulMohn  
                              Started by sugalt, Today, 04:02 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post sugalt
                              by sugalt
                               
                              Started by tradingnasdaqprueba, 04-09-2024, 09:52 AM
                              6 responses
                              30 views
                              0 likes
                              Last Post tradingnasdaqprueba  
                              Started by PaulMohn, Today, 02:06 AM
                              1 response
                              7 views
                              0 likes
                              Last Post PaulMohn  
                              Started by Mindset, Today, 01:27 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Working...
                              X