• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ticks per minute or Minutes per bar

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

    Ticks per minute or Minutes per bar

    I am using a Tick based chart and would like to know the speed of the market. I have tried volume but it does not tell me what I want to know. I cannot find another indicator on this site or that comes with NT7. I've tried the "AverageTick.zip" indicator. I've also tried "Bar Timer" but this indicator does not work on a tick based chart.

    Basically a simple line graph of the rate of ticks per minute or a graphical representation of how many minutes it took to complete each bar is needed.

    I have no C# coding experience but am willing to learn a bit if someone can push me in the right direction with this project.

    Thanks!

    #2
    Hello BReal,

    Thank you for your post.

    I am unaware of a pre-existing indicator that will perform what you require. However, this can be built with a multi-series script that adds the 1 Tick period type to the code to count the ticks per minute. The count would need to be an int added to the code.

    For information on multi-series script please visit the following link: http://www.ninjatrader.com/support/h...nstruments.htm
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Diy ?

      Originally posted by BReal View Post
      I am using a Tick based chart and would like to know the speed of the market. I have tried volume but it does not tell me what I want to know. I cannot find another indicator on this site or that comes with NT7. I've tried the "AverageTick.zip" indicator. I've also tried "Bar Timer" but this indicator does not work on a tick based chart.

      Basically a simple line graph of the rate of ticks per minute or a graphical representation of how many minutes it took to complete each bar is needed.

      I have no C# coding experience but am willing to learn a bit if someone can push me in the right direction with this project.

      Thanks!
      Using the indicator shell create and empty indicator, with no input and one plot.
      Replace the OnBarUpdate() code, where indicated, with the following. It should be self-explanatory: it shows the time elapsed per bar.

      Code:
      if (CurrentBar < 1) return;
      Plot0.Set((Time[0] - Time[1]).TotalMinutes);
      You can use TotalSeconds, or TotalMilliseconds if that gives you a more sensible output for your purposes.

      Comment


        #4
        Hey Koganam!

        Thanks for the reply! I'm not sure I understand though. Here is the code I have from the shell indicator.

        Code:
        public class TimePerBar : Indicator
            {
                #region Variables
                // Wizard generated variables
                // User defined variables (add any user defined variables below)
                #endregion
        
                /// <summary>
                /// This method is used to configure the indicator and is called once before any bar data is loaded.
                /// </summary>
                protected override void Initialize()
                {
                    Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
                    Overlay				= false;
                }
        
                /// <summary>
                /// Called on each bar update event (incoming tick)
                /// </summary>
                protected override void OnBarUpdate()
        From what you said it sounds like I replace that last part "OnBarUpdate()" with what you gave me below. I tried that but it won't compile. Here's what it looks like. I'm getting "Class member declaration expected." and "] expected." errors.

        Code:
         public class TimePerBar : Indicator
            {
                #region Variables
                // Wizard generated variables
                // User defined variables (add any user defined variables below)
                #endregion
        
                /// <summary>
                /// This method is used to configure the indicator and is called once before any bar data is loaded.
                /// </summary>
                protected override void Initialize()
                {
                    Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
                    Overlay				= false;
                }
        
                /// <summary>
                /// Called on each bar update event (incoming tick)
                /// </summary>
                if (CurrentBar < 1) return;
        	Plot0.Set((Time[0] - Time[1]).TotalMinutes);

        Comment


          #5
          google "ninjatrader bar speed timer" it free and it counts how long it takes to form a tick or range candle.

          Comment


            #6
            Originally posted by BReal View Post
            Hey Koganam!

            Thanks for the reply! I'm not sure I understand though. Here is the code I have from the shell indicator.

            Code:
            public class TimePerBar : Indicator
                {
                    #region Variables
                    // Wizard generated variables
                    // User defined variables (add any user defined variables below)
                    #endregion
            
                    /// <summary>
                    /// This method is used to configure the indicator and is called once before any bar data is loaded.
                    /// </summary>
                    protected override void Initialize()
                    {
                        Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
                        Overlay                = false;
                    }
            
                    /// <summary>
                    /// Called on each bar update event (incoming tick)
                    /// </summary>
                    protected override void OnBarUpdate()
            From what you said it sounds like I replace that last part "OnBarUpdate()" with what you gave me below. I tried that but it won't compile. Here's what it looks like. I'm getting "Class member declaration expected." and "] expected." errors.

            Code:
             public class TimePerBar : Indicator
                {
                    #region Variables
                    // Wizard generated variables
                    // User defined variables (add any user defined variables below)
                    #endregion
            
                    /// <summary>
                    /// This method is used to configure the indicator and is called once before any bar data is loaded.
                    /// </summary>
                    protected override void Initialize()
                    {
                        Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
                        Overlay                = false;
                    }
            
                    /// <summary>
                    /// Called on each bar update event (incoming tick)
                    /// </summary>
                    if (CurrentBar < 1) return;
                Plot0.Set((Time[0] - Time[1]).TotalMinutes);
            You must not have modified the code correctly. I do not see an OnBarUpdate() event handler in your code.

            Comment


              #7
              That's perfect! Thanks!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by babouin77, Today, 12:41 PM
              3 responses
              9 views
              0 likes
              Last Post babouin77  
              Started by punkiy2111, Today, 12:17 PM
              1 response
              9 views
              0 likes
              Last Post NinjaTrader_Tabor  
              Started by GLFX005, Today, 11:22 AM
              3 responses
              23 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by mintxom, Today, 10:25 AM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_Melissa  
              Started by Matts7, Today, 08:27 AM
              5 responses
              43 views
              0 likes
              Last Post Matts7
              by Matts7
               
              Working...
              X