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

TickCount

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

    TickCount

    Hello Support,

    I am doing indicator using TickCount, when Indicator is loaded, the Bars.TickCount give correct historical values, but when it is running realtime afterwards, Bars.TickCount is always 1 ?! resulting errorneous plots.

    Is this because Bars.TickCount is referring to new bar that just open?
    But COBC is true, should it not give TickCount of last completed bar?

    NT has Volume DataSeries, does NT have TickCount DataSeries?
    How do I get correct TickCount ?

    Regards,

    Edward K

    #2
    Edward,

    I am happy to assist you.

    Yes, you would need to use COBC = false. Volume and tick counts are highly correlated, so a volume data series would look nearly identical to a tick count data series times some constant.

    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      TickCount

      Hello AdamP,

      That is not good. Shoud it not reflect the completed bar TickCount?, because when COBC is true, Volume[0] is referring the completed bar, it does not have the first Tick's volume. So Bars.TickCount should be TotalTicks of the just completed bar.
      If that is not possible, NT should create another variable for this or best is to provide IntSeries TickCount, please suggest this to your development team!

      I would not like to set COBC to true, too much wasted computing just to get TotalTick.
      Market is dynamic, ratio of Volume to TickCount is not constant, it varies bar to bar, depending sentiment or agressiveness of traders.

      Thanks,

      Regards,
      Edward K.

      Comment


        #4
        Edward,

        You can try to use my indicator to get the ticks for past bars. Its counting them in blocks of 150 ticks but you can change this in the code.

        I have attached comparisons of TickCount vs. Volume for Kinetick and eSignal data. I reloaded all historical tick data each time before hand. As you can see its not exact but its pretty close. There may be differences between real-time and historical however.
        Attached Files
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          TickCount

          Hello AdamP,

          I see the code, unique application of NT7 multi time-frame feature.
          Will adopt this for the time-being. But still hoping future NT release could address this in a consistent manner.

          Many thanks for the codes.

          Regards,
          Edward K.

          Comment


            #6
            Edward,

            I will suggest to development on your behalf.

            Please let me know if I may assist further.
            Adam P.NinjaTrader Customer Service

            Comment


              #7
              Thanks for BarTicks...


              Answered my own question and edited it out


              Thanks
              Last edited by Crassius; 02-11-2012, 12:06 PM.

              Comment


                #8
                Hallo..there are news about this indicator?


                Thanks

                Comment


                  #9
                  Hello turbofib,

                  Thank you for your post.

                  Which indicator do you refer to?

                  I have not tested this Bars.TickCount item myself, but can do so during the market hours tomorrow. Otherwise there has been no word on this property.

                  Comment


                    #10
                    Adam Said : "You can try to use my indicator to get the ticks for past bars. Its counting them in blocks of 150 ticks but you can change this in the code."
                    Then counts historical tick takes place in blocks of 150 pt ....
                    this is temporary remedy but not the right solution..

                    the indicator should count every tick of the bar in question and not to block "number" tick

                    In fact Ninjatrader_AdamP said:
                    Edward,

                    "I will suggest to development on your Behalf. "
                    Last edited by turbofib; 01-27-2014, 03:01 AM.

                    Comment


                      #11
                      Hello turbofib,

                      Thank you for your response.

                      There has been no word on this item, however we look to improve on historical data in the next major release of NinjaTrader.

                      To set the indicator NinjaTrader_AdamP created to use the value of tick of the desired you can edit the indicator each time or replace 150 with BarsPeriod.Value.
                      Code:
                              protected override void Initialize()
                              {
                                  Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Bar, "Ticks"));
                      			Add(PeriodType.Tick,BarsPeriod.Value);
                      			
                      			counter = 0;
                      			
                                  Overlay				= false;
                              }
                      
                              /// <summary>
                              /// Called on each bar update event (incoming tick)
                              /// </summary>
                              protected override void OnBarUpdate()
                              {
                      			if(BarsInProgress == 1)
                      			{
                      				counter = counter + 1;
                      			}
                                  // Use this method for calculating your indicator values. Assign a value to each
                                  // plot below by replacing 'Close[0]' with your own formula.
                      			if(BarsInProgress == 0)
                      			{
                                  	Ticks.Set(counter*BarsPeriod.Value);
                      				counter = 0;
                      			}
                              }

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by love2code2trade, Yesterday, 01:45 PM
                      4 responses
                      28 views
                      0 likes
                      Last Post love2code2trade  
                      Started by funk10101, Today, 09:43 PM
                      0 responses
                      7 views
                      0 likes
                      Last Post funk10101  
                      Started by pkefal, 04-11-2024, 07:39 AM
                      11 responses
                      37 views
                      0 likes
                      Last Post jeronymite  
                      Started by bill2023, Yesterday, 08:51 AM
                      8 responses
                      45 views
                      0 likes
                      Last Post bill2023  
                      Started by yertle, Today, 08:38 AM
                      6 responses
                      26 views
                      0 likes
                      Last Post ryjoga
                      by ryjoga
                       
                      Working...
                      X