What it does
The Bar Speed Indicator turns bar completion tempo into a simple read on market urgency. It is most useful when you want to separate real expansion from sleepy drift without scanning every candle by eye.
Who this is for
This page is a good fit for traders who want a readable Bar Speed Indicator workflow without having to reverse-engineer the setup from forum posts or screenshots.
Key terms for this tool
Review the core trading and platform terms tied to this page before changing settings or using the study in a live workspace.
What it is not
Bar Speed Indicator is a chart-context tool. It does not place trades, manage risk automatically, or promise that a specific pattern will resolve in one direction. Use it to organize decisions, not to outsource them.
Chart examples
This chart capture shows the study on a real NinjaTrader workspace. Use it as visual reference, then confirm behavior on your own instrument, session, and timeframe.
Bar tempo on a live chart
A NinjaTrader 8 chart capture showing how Bar Speed keeps changing participation tempo visible while price rotates and expands.
Best fit
- Confirming that a breakout is attracting real activity.
- Avoiding entries during slow, low-participation chop.
- Comparing tempo across tick, range, and time-based charts.
Before using it live
- Import the NinjaTrader 8 ZIP through NinjaTrader's normal import flow.
- Apply the study to the chart type you actively trade.
- Use the indicator as participation context, not a standalone entry signal.
- Review how the tool behaves on your actual session template, chart type, and instrument.
Settings to review
Controls the bars used to normalize recent speed.
Marks unusually fast bars once speed exceeds the selected level.
Reduces noise when the chart produces many small bars.
Installation notes
- Import the NinjaTrader 8 ZIP through NinjaTrader's normal import flow.
- Apply the study to the chart type you actively trade.
- Use the indicator as participation context, not a standalone entry signal.
Downloads
Source code
These source examples are provided for copy/paste workflows on other charting platforms. Review and test any script in a simulator before using it on a live chart.
{
Bar Speed Indicator
FreeIndicators.com source example.
Works as a starting point for TradeStation EasyLanguage and MultiCharts PowerLanguage.
}
Inputs: Lookback(20), FastThreshold(150);
Vars: SecondsPerBar(0), AvgSeconds(0), SpeedScore(0);
SecondsPerBar = MaxList(1, (DateTime - DateTime[1]) * 86400);
AvgSeconds = Average(SecondsPerBar, Lookback);
SpeedScore = AvgSeconds / SecondsPerBar * 100;
Plot1(SpeedScore, "Speed");
If SpeedScore >= FastThreshold Then Plot2(SpeedScore, "Fast"); // Bar Speed Indicator
// FreeIndicators.com source example for MetaTrader 4.
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 DodgerBlue
#property indicator_color2 Crimson
#property indicator_color3 SeaGreen
double Buffer1[];
double Buffer2[];
double Buffer3[];
int init() {
SetIndexBuffer(0, Buffer1);
SetIndexBuffer(1, Buffer2);
SetIndexBuffer(2, Buffer3);
return(0);
}
int start() {
int counted = IndicatorCounted();
int limit = Bars - counted - 1;
int lookback = 20;
for(int i = limit; i >= 0; i--) {
double seconds = MathMax(1.0, Time[i] - Time[i + 1]);
double total = 0;
for(int j = 1; j <= lookback; j++) total += MathMax(1.0, Time[i + j] - Time[i + j + 1]);
double avg = total / lookback;
Buffer1[i] = avg / seconds * 100.0;
}
return(0);
} // Bar Speed Indicator
// FreeIndicators.com source example for MetaTrader 5.
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_plots 3
double Buffer1[];
double Buffer2[];
double Buffer3[];
int OnInit() {
SetIndexBuffer(0, Buffer1, INDICATOR_DATA);
SetIndexBuffer(1, Buffer2, INDICATOR_DATA);
SetIndexBuffer(2, Buffer3, INDICATOR_DATA);
return(INIT_SUCCEEDED);
}
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[]) {
int start = prev_calculated > 1 ? prev_calculated - 1 : 1;
int lookback = 20;
for(int i = start; i < rates_total - lookback - 1; i++) {
double seconds = MathMax(1.0, (double)(time[i] - time[i - 1]));
double total = 0;
for(int j = 1; j <= lookback && i - j - 1 >= 0; j++) total += MathMax(1.0, (double)(time[i - j] - time[i - j - 1]));
Buffer1[i] = (total / lookback) / seconds * 100.0;
}
return(rates_total);
} //@version=5
indicator("Bar Speed Indicator", overlay=true)
lookback = input.int(20, "Lookback", minval=2)
secondsPerBar = math.max(1.0, (time - time[1]) / 1000.0)
avgSeconds = ta.sma(secondsPerBar, lookback)
speed = avgSeconds / secondsPerBar * 100.0
plot(speed, "Speed score", color=color.blue)
hline(100, "Average")
plotshape(speed >= 150, "Fast", shape.circle, location.top, color=color.orange) Limitations
- Fast bars can appear during continuation or exhaustion.
- The study does not predict direction by itself.
- Settings should be tested separately for each chart type.
Frequently asked questions
Does it repaint?
This indicator is designed as a chart reference tool, not as a hindsight-only backfitted signal. Even so, you should still test it bar by bar on your chart type to confirm how it behaves on the active bar.
Which platforms are covered?
NinjaTrader 8, TradeStation EasyLanguage, MultiCharts PowerLanguage, MetaTrader 4, MetaTrader 5, TradingView Pine Script are currently represented through downloads or source pages.
Is source code included?
Yes. This page includes source examples or links to platform-specific source pages where applicable.