Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Ticks per minute or Minutes per bar
Collapse
X
-
You must not have modified the code correctly. I do not see an OnBarUpdate() event handler in your code.Originally posted by BReal View PostHey Koganam!
Thanks for the reply! I'm not sure I understand though. Here is the code I have from the shell indicator.
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> protected override void OnBarUpdate()
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);
Leave a comment:
-
google "ninjatrader bar speed timer" it free and it counts how long it takes to form a tick or range candle.
Leave a comment:
-
Hey Koganam!
Thanks for the reply! I'm not sure I understand though. Here is the code I have from the shell indicator.
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> protected override void OnBarUpdate()
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);
Leave a comment:
-
Diy ?
Using the indicator shell create and empty indicator, with no input and one plot.Originally posted by BReal View PostI 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!
Replace the OnBarUpdate() code, where indicated, with the following. It should be self-explanatory: it shows the time elapsed per bar.
You can use TotalSeconds, or TotalMilliseconds if that gives you a more sensible output for your purposes.Code:if (CurrentBar < 1) return; Plot0.Set((Time[0] - Time[1]).TotalMinutes);
Leave a comment:
-
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
Leave a comment:
-
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!
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
156 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
90 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
140 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
130 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
107 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Leave a comment: