NinjaTrader 7 Indicators - Visual SMA Multi-Timeframe
futures io

Categories Help    

NinjaTrader 7 Indicators
Indicators in this section are compatible with NinjaTrader 7

Visual SMA Multi-Timeframe 5 *
Exported using NT Version 7.0.1000.11

Indicator will only run on NT 7.0.1000.4 or later.

The VisualSMA is a MTF (multi-timeframe) version of the Simple Moving Average. It will plot on any chart and allows to calculate the moving average

- from minute bars
- from second bars
- from tick bars
- from range bars
- from volume bars

For example you can display an hourly SMA on a 235 tick chart, or display a 11-period SMA calculated from a 500 tick chart on a 7 range chart.

The indicator has three modes to display the moving average:

StrategicMode: The first bar series collects the values from the secondary series without any lag on historical data, but a 1-tick lag on real-time data. This mode does not repaint, but shows the values originally recovered from the secondary bar series. On the chart the indicator in Strategy Mode is plotted yellow.

FirstTickMode: To avoid the lag for similar bars with identical time stamps, the indicator repaints the indicator value for the prior bar, after the first tick of the current bar has been registered. The one-tick repainting reduces the lag. On the chart the FirstTick Mode is shown in red.

Visual Mode: To make it easier to use the indicator visually, the indicator interpolates the distance between two consecutive bars of the secondary bar series. The interpolation algorithm works in real-time and simulates the CalculateOnBarClose = false mode for the indicator relative to the secondary bar series. It repaints the current leg of the indicator back to the prior bar of the secondary series. The interpolation adapts itself to equidistant or non-equidistant charts. The Visual Mode is shown in aqua.

This indicator comes as a protected assembly, so you cannot directly access the code.

Update August 30, 2011: 1-Tick Repainting for VisualMode and FirstTickMode was only enabled for fixed period bars. It is now also available for other bar types.
Update September 6, 2011: Bug fixed. VisualMode interpolation could be a few ticks off on real-time data.
Update November 9, 2011: Indicator entirely recoded, robustness and speed improved, lag reduced.
Update November 23, 2011: Indicator was lagging with CalculateOnBarClose = true setting. Lag is eliminated.
Update January 5, 2012: Option added to select color according to the slope of the VisualSMA. Paintbars added as a trendfilter.
Update August 15, 2012: Code updated to allow for displacement of indicator.
Update September 29, 2012: Renko option removed. Indicator could not always be called from a strategy, bug removed.

Please remove prior versions of the indicator, before installing the new release:
(1) Remove old assembly via File -> Utilities -> Remove NinjaScript Assembly.
(2) Shut down NinjaTrader and restart it.
(3) Install new file via File -> Utilities -> Import NinjaScript.

Category NinjaTrader 7 Indicators 
Suggest other entries I might like
Details: Visual SMA Multi-Timeframe
Category: NinjaTrader 7 Indicators 

September 29th, 2012
Size: 48.34 KB
Downloaded: 7059 times

Keywords: movingaverage mtf multi-timeframe sma


Copyright © 2022 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada),
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.