Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is NT has a chronic bug?

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

    #16
    Jessica, sorry can not use sendspace but i sent an email to [email protected] that contain a link that easily can download the video. Please inform me when you receive the video. I'll try to explain problem in detail.

    UPDATE :

    Issue 1) At weekend i test detailed that adding higher time frame indicator to the chart with AddChartIndicator method. It's really ruin the chart and strategy. For example let say we open a chart and put two time frame on it (4 tick & 40 tick). After ticks coming, of course 4 tick bars take shape first. Let say a few bar later, first 40 tick bar take shape NT plotting it's indicator value on 4 tick chart's first bar only (currentbar=0). After second 40 tick bar take shape NT plotting indicator value to second 4 tick bar (currentbar=1). I don't understand what is the logic about that...So i have to change my code again and use custom plots in my strategy.

    My opinion that; after watch my screen record you'll see clearly NT8 has serious problems about renko charts and multi time frame charts. Again please after receive my screen record inform me i'll give you some info that will help you about invertigate a problem.

    Issue 2) I test my strategy both AddDataSeries overloads separately (look at below) and see the strategy results same but i'll do more test for different time frames and/or different instruments(for both called during configure state because when i called method during dataloaded receiving an error). Suppose all test results are the same, so when we use first overload method NT must be using same instrument, same trading hours, same data type(bid/ask/last) and same EOD settings. Could you please confirm this from dev. team?

    First overload : AddDataSeries(BarsPeriod.BarsPeriodType, BarsPeriod.Value * 8);
    Second overload : AddDataSeries(Instrument.FullName, new BarsPeriod() { MarketDataType = BarsPeriod.MarketDataType, BarsPeriodType = BarsPeriod.BarsPeriodType, Value = BarsPeriod.Value * 8}, Instrument.MasterInstrument.TradingHours.Name, null);

    Shortly, you requested from me that inside strategy code use AddChartIndicator and AddDataSeries method that not use instrument class. I can not realize first request but second is looks like ok.
    Last edited by aytacasan; 03-06-2017, 01:47 AM.

    Comment


      #17
      For reference, I will be following up regarding the Market Analyzer behavior in thread 97191, found here,

      http://ninjatrader.com/support/forum...ad.php?t=97191

      And I will be following up regarding the BarsInProgress behavior alone in this thread.
      Jessica P.NinjaTrader Customer Service

      Comment


        #18
        Hello Jessica,

        Thanks for your interest. I read all posts again And want to summarize these;

        1. You request from me use AddDataSeries overload that no require instrument class and it's properties. This is ok, i change my code like you want and test it, result is working correctly.
        2. You request don't use custom plots in your strategy, i think for simplicity. But i can't because higher time frames plots, ploting only one sub bar (leftmost bar).

        I don't know did you notice my update on post #16 (http://ninjatrader.com/support/forum...7&postcount=16). If not please read it.

        Most important part

        When i read old posts i realized i can not give you enough info about my debug process. Here is new info;

        1. You know i'm using two data series one is 4 ticks other is 10 ticks renko.
        2. I'm using secondary data series for some decisions and because of i want to see it's working correct or not i plot higher time frame indicator values to a primary data series.
        3. Because i want to see indicator values on each bar (primary (lower) time frame bar), i can not use AddIndicatorToChart method instead i use custom plots in the strategy.
        4. Before use it, i test my indicator on a chart (single time frame). Because calculation no need any prior bar data and BarsRequiredToPlot is zero, each bar there is a plotting value.
        5. When i test indicator on market replay i see a problem which is for first 20 bars (20 bars on higher time frame data series) there is 0 values. Because of that i said my opinion problem is not NaN values. Please look at my #1 post (http://ninjatrader.com/support/forum...95&postcount=1).
        6. Put some prints on code for debug purposes. And see before historical state indicator's BarsRequiredToPlot is zero like i set but after enter historical state this value auto changing 20.
        7. Because of that also i reset BarsRequiredToPlot is zero inside indicator's historical state. And see problem is solved, zero plot values gone and normal plot values come. Yes i know this is not logical but solved my problem.

        I hope this information will helps to you and solve my issues as soon as possible.

        Thanks,
        Aytac
        Last edited by aytacasan; 03-06-2017, 01:58 PM.

        Comment


          #19
          It looks like I did miss replying to some things you requested a reply for in post # 16.

          To your first question, tick and event ordering is discussed in detail in this thread.
          http://ninjatrader.com/support/forum...d.php?p=491187

          To your second question from post 16, for these two overloads,

          Code:
          AddDataSeries(BarsPeriod.BarsPeriodType, BarsPeriod.Value * 8);
          AddDataSeries(Instrument.FullName, new BarsPeriod() { MarketDataType = BarsPeriod.MarketDataType, BarsPeriodType = BarsPeriod.BarsPeriodType, Value = BarsPeriod.Value * 8}, Instrument.MasterInstrument.TradingHours.Name, null);
          These will result in adding data series with the same :

          • instrument
          • trading hours
          • data type (bid/ask/last)

          With regard to EOD settings however, in the first overload, you will use the Break at EOD settings your user specifies in the GUI window when they first set up the data series, where in the second longer overload, you will ignore the settings users set in the GUI and instead hard code this to your liking as the developer as your last parameter.
          Jessica P.NinjaTrader Customer Service

          Comment


            #20
            Hello Jessica,

            My first question in post #16 is so different thing. But no problem, right now if we agree my scenario is available for investigate by you. Because i'm using AddDataSeries like your said and using custom plots like NT's help guide samples. So are you investigating my problem which i mention at post #1?

            About AddDataSeries; When i use first overload (shorter one), if secondary data series all settings will be same as user selected (instrument, trading hours, data type, EOD etc.), this is exactly what i want, i don't try/want to override any setting. So if i open ES 03-17 4 tick renko without EOD settings (unchecked) and attach my strategy on it, if secondary data series copy all settings from primary series, this is perfect. When i use add strategy feature on strategies tab, scenario is the same, secondary data series using primary data series settings which user set before enable strategy. Am i right?

            Thanks,
            Aytac
            Last edited by aytacasan; 03-08-2017, 04:29 AM.

            Comment


              #21
              I have some follow up information available. The attached script demonstrates how we can have a BarsRequiredToTrade value in a strategy larger than a BarsRequiredToPlot for child indicators. This strategy captures SMA values from bars 5-25 (starting at 5 to account for the period) and replays these values over and over. This strategy has a BarsRequiredToTrade value of 100, and the SMA indicator has a BarsRequiredToPlot value of 20 by default.

              Please study this sample, and make modifications to your own code as needed.

              Your understanding of AddDataSeries is correct.

              We are happy to help in any way we can.
              Attached Files
              Jessica P.NinjaTrader Customer Service

              Comment


                #22
                Hello Jessica,

                Sure about that i'm really want to help you and really want to help improve NT8 as much as i can. I wrote so simple sample and sent to you. After that you request to change some parts and changed it like your said. Now you send me sample which is not fit my scenario and my opinion it's so complicated vs mine sample.

                Because of that i'll send you 3 screen records (to [email protected]). Please watch it in order their number. In videos i'm showing indicator&strategy's code (updated according your requests) and showing step by step what is the problem. Before i said used Historical state for solve my problem but see DataLoaded state is also solving my problem, you'll see what i mean in videos.

                Video Links;

                1. https://1drv.ms/u/s!AjeE-TTaKL0-pg6JPXOGiFcS-o8Q
                2. https://1drv.ms/u/s!AjeE-TTaKL0-pg_f15XZTXCn0ZzX
                3. https://1drv.ms/u/s!AjeE-TTaKL0-pg3fVGmFS0B_rbqJ

                Thanks,
                Aytac
                Last edited by aytacasan; 03-09-2017, 07:53 AM.

                Comment


                  #23
                  It sounds like we are on the same page as far as how Ninja operates, and you have been able to get to a point where your strategy works as expected.

                  If you would like Ninja to work differently, please describe in a sentence or two how we can improve NinjaTrader and I will be happy to pass this information along to the responsible teams.
                  Jessica P.NinjaTrader Customer Service

                  Comment


                    #24
                    Jessica,

                    I think there is misunderstanding. I said that i solved my problem but my solution is temporary and not make sense. I'm waiting consistent solution from you. My question is already valid, why we have to set BarsRequiredToPlot during Historical or DataLoaded state although we set it during SetDefaults state? Why indicator work expected on a chart but not working expected when we use it inside strategy?

                    Thanks,
                    Aytac

                    Comment


                      #25
                      I appreciate your patience as we work together to reach a point of understanding. The script I provided was provided not as a working solution, but as an educational aid. It proves, first, that a script with a high BarsRequiredToTrade and a low BarsRequiredToPlot will still get information from an indicator before BarsRequiredToTrade has elapsed. This means you will need to review the logic in the code I provided, and your own logic, to determine why your script is behaving the way it is. We have learned from this script, then, that there is not a NinjaTrader bug. There is a limitation with respect to Renko bars, and we have requested a work-around for this limitation. Outside of this limitation, NinjaTrader has been demonstrated to work exactly the way it is spelled out in the help guide.

                      If you would like Ninja to work in a different way than specified in the help guide, for example, with respect to State.DataLoaded and State.Configure, please explain how you would like Ninja to work. From there I can forward your recommendation to the product management team.
                      Jessica P.NinjaTrader Customer Service

                      Comment


                        #26
                        Jessica,

                        Really thanks for your efforts about solve my problem. But i can not say i understand you on not. I think don't understand, more likely I don't know NT's internal logic but i'm guessing;

                        1. Secondary data series added during strategy's configure state.
                        2. Indicator creating during strategy's data loaded state.
                        3. Indicator's BarsRequireToPlot setting 0 by me during set defaults state
                        4. Don't know why? Indicator's BarsRequireToPlot setting by NT to 20 by NT
                        5. Strategy try to access indicator value which is barsago below 20. At that point indicator returning 0 value (not a NaN or right value)
                        6. When i set this values to my plot, my chart tightening of course.

                        First, i'm trying to understand reason of step 4. For solve this issue temporary i'm re-setting Indicator's BarsRequireToPlot to 0 during Indicator's data loaded state too. If you mean this is reason of NT's limitation because of it's internal logic respect to renko, that's ok and no problem for me, when i'll use my indicators with renko charts i can set BarsRequireToPlot to 0 during both state set defaults and data loaded.

                        Second, i'm trying to understand your example code;
                        1. What is the purpose of CurrentBar % 20?
                        2. Why your are creating two dimensinal double array (vals)?
                        3. Why you are setting vals first than set it's values to Values[][]?
                        4. Where is the plot series? Is Values are plot series?
                        5. I'm trying to set plot values to chart from higher time frame indicator values, so i don't understand intersection of your example and my issue. For example, your example plotting to chart nothing.

                        Third, If i have fault about my scripts or i have wrong understanding/logic, please be clear about it and point me to the right direction.

                        Thanks,
                        Aytac
                        Last edited by aytacasan; 03-11-2017, 06:40 AM.

                        Comment


                          #27
                          To your first question, all newly created indicators are populated with their default settings on initial object creation. You can override these. If this is not specified in the indicator's source, this is 20 by default. If you wanted an indicator to have a different BarsRequiredToPlot value, you could e.g.

                          Code:
                          private SMA mySMA;
                          protected override void OnStateChange()
                          {
                            if (State == State.Configure)
                            {
                              mySMA = SMA(9001);
                              mySMA.BarsRequiredToPlot = 99;
                            }
                          }
                          BarsRequiredToPlot will not prevent an Indicator's OnBarUpdate from being run. It is independent of a parent strategy's BarsRequiredToTrade. Indicator authors can choose to ignore this setting and not incorporate it into their code.

                          To your second set of questions, in plain language, the strategy I put together

                          • loads the first 20 values from the SMA indicator
                          • repeats these values over and over in a plot

                          We may have been misunderstanding each other. What I got out of your initial post is that you were wondering why you were unable to access indicator values before BarsRequiredToPlot has been met. This script demonstrates that you are. The underlying logic simply accomplishes this goal. While I will be happy to explain the logic used in greater detail, since we are still mentioning renko bars, I feel focusing too much on this script will not allow us to reach a point where we are on the same page, and would prefer tabling any discussion about how this script operates.


                          Without referring to any test code or any of the rest of the discussion, what are we trying to demonstrate about Ninja, and what questions may I answer?
                          Jessica P.NinjaTrader Customer Service

                          Comment


                            #28
                            We understand your time is valuable. If I was able to answer your question or you were able to provide an answer to your own question, in this or any other thread, no further action is required. Otherwise I look forward to assisting further.
                            Jessica P.NinjaTrader Customer Service

                            Comment


                              #29
                              Jessica,

                              Actually i could not get an answer to my question. But i think i can not clearly ask my question because of my poor English. Anymore you do not have to spend time about this question.

                              I think problem come from my coding style;
                              1. For an indicator OnBarClose always works does not matter BarsRequiredToPlot value is 0,10 or 20, this property only related start to draw plots on a chart after X bar later
                              2. But my style is that if my indicator have to start to calculate indicator's values X bar later, also i'm setting BarsRequiredToPlot to X and at the top of OnBarClose i'm checking this value and i'm blocking calculations like below

                              if (CurrentBar < BarsRequiredToPlot) return;

                              3. In my example BarsRequiredToPlot is zero and because of internal NT logic, NT override my BarsRequiredToPlot to 20 (Only when i use my indicator inside a strategy!). After that my indicator calculations not working (Don't know if not working why values zero instead NaN).

                              Anyway like i said don't spend time for this post anymore. This is not critical for me and most probably reason is my coding style (i'll test it later to see, is that so or not).

                              Thanks,
                              Aytac
                              Last edited by aytacasan; 03-15-2017, 04:15 PM.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by cedxaqa, Today, 07:16 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post cedxaqa
                              by cedxaqa
                               
                              Started by Prasanna, Today, 02:53 AM
                              1 response
                              14 views
                              0 likes
                              Last Post NinjaTrader_ShawnB  
                              Started by KevinWalker, Yesterday, 07:48 PM
                              1 response
                              10 views
                              0 likes
                              Last Post NinjaTrader_ShawnB  
                              Started by Leeroy_Jenkins, Today, 03:00 AM
                              0 responses
                              11 views
                              0 likes
                              Last Post Leeroy_Jenkins  
                              Started by PeterInBrisbane, Today, 01:07 AM
                              0 responses
                              17 views
                              0 likes
                              Last Post PeterInBrisbane  
                              Working...
                              X