Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Closes[1]

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

    #31
    LostTrader, we're not sure why you believe 25 Vol multilied by 5 should ressemble a 225 Vol chart, could you please clarify?

    Also: please test this only from a single series chart, as if you're working with a MultiSeries one you would be using non equidistant bar spacing -



    CalculateOnBarClose will always be 'true' for historical data, setting it to 'false' and working inside FirstTickOfBar would only be effective using realtime data going forward or for example in Market Replay mode.
    BertrandNinjaTrader Customer Service

    Comment


      #32
      LOL, oh my... Because apparently I multiply by 7s better than 5s. My stupid bad.
      Thank you, Bertrand.

      Unfortunately, comparing 25*5 to 125 this time, still did not help the Test2 indicators look the same. And they should be close... How to fix this?

      I am aware of the NT problem forcing non equidistant bar spacing, and that several users have requested that this be fixed. I also hope it gets fixed, so that the Bars are equidistant to the Primary Bar Series.
      Attached Files

      Comment


        #33
        LostTrader, it appears you would need to run your indicator running on the faster chart on higher period settings to recreate the higher timeframe appearance (35, 105, 35).

        If you use MultiSeries charts, equidistant bar spacing will be false to allow for all intervals to be viewed in a constant manner and avoid distortions the time differences would otherwise introduce.
        BertrandNinjaTrader Customer Service

        Comment


          #34
          Originally posted by NinjaTrader_Bertrand View Post
          LostTrader, it appears you would need to run your indicator running on the faster chart on higher period settings to recreate the higher timeframe appearance (35, 105, 35).
          If the indicator on the faster chart were running on BIP=0, then yes, I agree. That's how I do handle it in 6.5. Unfortunately my users have been clamoring for a multi-bar version for NT7, hence my need to get this to make sense.

          But the indicator on the faster bar series adds its own bar series in the Initialize() method which is already faster by 5 and the calculations are supposedly only using Closes[X]. Therefore the input of the indicator on the faster bar series is set to use X=1.

          Similarly, the indicator on the slower bar series (added to chart) would not use the internal BIP=1 because it is already being fed the slower bar series & therefore the input of the indicator on the chart's slower bar series is set to use X=0.

          You and I worked through this using the simple Test which was a single MA. So logically, it should work on a triple MA but isn't. Help? It needs to make sense,please.

          Comment


            #35
            LostTrader, I believe you're running into the issue that your custom dataseries you're using to calculate the TSI values are synched to the primary series still - please try the attached and let me know if this is closer to what you expect to see, this implements the TSI formula as it's own method that can then be called on BarsArray[1] thus providing proper sync. From a quick visual I believe this is what you're after here.
            Attached Files
            BertrandNinjaTrader Customer Service

            Comment


              #36
              Bertrand, this is what I did first and abandoned because I thought it was incorrect.
              (I called my external indicator wTSI ) . Unfortunately, as you can see, they are still not even close. This picture is of your Test2 calling tsiTest.

              Question, should the tsiTest be written to use Input instead of Close?

              Edit: Nevermind, got it. You specified BarsArray[1] instead of BarsArray[x].
              That fixed it and they now look alike. Great, now I can move forward to Test3.
              Attached Files
              Last edited by Lost Trader; 08-05-2010, 09:37 AM.

              Comment


                #37
                I have some additional testing, but after looking at your code, I pulled up my wTSI_smoothed (which calls wTSI) and put it on the same chart -- it does NOT have a BIP input so I only put it on the chart's 125V, thinking it would look like the other on 125V. Lo and behold it does not. It looks like the 25*5V.... That implies it is the BIP=0 that is broken, not the BIP=1...

                Now I wonder if I add a BIP input if it will break the way the Test2 has apparently broken??? Got to find out where the break is...
                Attached Files

                Comment


                  #38
                  Hmm, I think you would need to set your series mult then to 1, as now you look at a 125 * 5 = 625 V chart?
                  BertrandNinjaTrader Customer Service

                  Comment


                    #39
                    Test3 -- adds Histogram

                    Test3 : (we are making progress!! )
                    adds a histogram to the line plot (of changes in the line (.i.e., C0-C1).

                    Unfortunately, plotting from BIP=0 (which is Required by NT) says, on 4 out of 5 bars, the change is 0 So the color of the plot is wrong. Now sometimes, I expect the calculation will be zero, so it doesn't seem accurate to just ignore that value...

                    How to get the Histograms to match, please?

                    BTW, I tried using a similar call to wTSI_histogram, but the compiler complained:
                    HIST.Set( wTSI_histogram(eTSI, hist_multiplier, minHIST) );
                    saying that eTSI was not a valid input -- I thought I could pass a DataSeries as an Input? The line is in Test3 commented out, I placed the calc inline for now.
                    Attached Files

                    Comment


                      #40
                      LostTrader, same issue as the prior one here - your custom dataseries is synched to the primary series, not the added one - either run the histogram also as an external method / indicator on BarsArray[x] or sync your internal dataSeries as explained in this sample -

                      Note: In NinjaTrader 8 It is no longer needed to use an indicator to sync a secondary series. This can be done directly from the Series<T> (https://ninjatrader.com/support/helpGuides/nt8/NT%20HelpGuide%20English.html?seriest.htm) constructor. This post is left for historical purposes. Series objects are useful for
                      BertrandNinjaTrader Customer Service

                      Comment


                        #41
                        Bertrand, I did try to run it as an external method, as I explained.

                        BTW, I tried using a similar call to wTSI_histogram, but the compiler complained:
                        HIST.Set( wTSI_histogram(eTSI, hist_multiplier, minHIST) );
                        saying that eTSI was not a valid input -- I thought I could pass a DataSeries as an Input? The line is in Test3 commented out, I placed the calc inline for now.


                        How do I get the external method take the eTSI as the Input DataSeris?

                        Comment


                          #42
                          Lost Trader,

                          wTSI_histogram() would actually have to have an overload method that accepts IDataSeries objects. Unfortunately I do not know how exactly this method is created. What does the Intellisense say for acceptable overloads on that method? Thanks.
                          Josh P.NinjaTrader Customer Service

                          Comment


                            #43
                            wTSI_histogram() has an override that accepts IDataSeries. All NT Indicators do, the compiler ensures it (all that auto-generated script at the bottom of an indicator).

                            I fixed the code so the call to wTSI_histogram() compiled -- a common error, I forgot the [0] on the end. It did not correct the plot, it is still wrong.

                            I moved the direction calculation inside the called method. Still not correct.
                            I can no longer pass BarsArray[x] as the input when it is using eTSI...

                            When passing a IDataSeries as an input, how to tell the method to run it only on BIP=1?
                            Attached Files

                            Comment


                              #44
                              LostTrader, please see my attached file - calculating the histogram with the histogram synched to BIP1, looks ok to me, please give it a run.
                              Attached Files
                              BertrandNinjaTrader Customer Service

                              Comment


                                #45
                                Test 3 (new) works

                                Thank you, Bertrand. Yes that works! Looks fairly good, in fact, considering the non-equidistant bars.

                                Code:
                                eTSI.Set(wTSI_smoothed(BarsArray[x], period1, period2, period3)[0]);
                                HIST.Set( wTSI_histogram(wTSI_smoothed(BarsArray[x], period1, period2, period3), hist_multiplier, minHIST)[0] );
                                I admit that I concerned about the necessary duplicate processing (executing the exact same code twice) especially since Ninjatrader v7 continues to restrict charting to only a single thread. As any multi-bar indicator code becomes more complex, the performance will be impacted more than linear...

                                For now, you will be happy to know that I have not yet developed a more complex test-case, so no Test4.
                                Attached Files

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Vulgoth_t_Destroyer, 05-09-2022, 04:45 PM
                                55 responses
                                5,453 views
                                0 likes
                                Last Post BartMan
                                by BartMan
                                 
                                Started by DawnTreader, 05-08-2024, 05:58 PM
                                16 responses
                                52 views
                                0 likes
                                Last Post DawnTreader  
                                Started by tradingnasdaqprueba, 05-07-2024, 03:42 AM
                                15 responses
                                61 views
                                0 likes
                                Last Post NinjaTrader_Jesse  
                                Started by kevinenergy, Yesterday, 12:01 PM
                                8 responses
                                28 views
                                0 likes
                                Last Post kevinenergy  
                                Started by nightstalker, Today, 01:32 PM
                                1 response
                                12 views
                                0 likes
                                Last Post NinjaTrader_Zachary  
                                Working...
                                X