NexusFi: Find Your Edge


Home Menu

 



Categories Help    






 
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: 7070 times

Keywords: movingaverage mtf multi-timeframe sma
Comments/ratings
5 * Gabriyele June 24th, 2011 04:15 AM
FatTails you RULE!! Danke Vielmals!
5 * Trafford June 24th, 2011 05:48 PM
FatTails - yet again you never fail to produce good indicators on BMTF
5 * tst1 June 25th, 2011 09:38 AM
FT, can you make Better Volume multiple timeframes??
5 * SARdynamite July 9th, 2011 02:24 PM
Thanks Fat Tails
5 * Aragorn July 14th, 2011 10:31 PM
Awesome Fat Tails. Great work. Thank-you. Is it possible to color the SMA's green for up and red for down? You Rule!
5 * cclsys July 26th, 2011 10:22 PM
Very interesting.
Suggestion: use Collective MA option for the MA period then user just chooses different time frame.

Personally, I like a fib-based collective such as:
double _sma5 = SMA(5)[0];
double _sma8 = SMA(8)[0];
double _sma13 = SMA(13)[0];
double _sma21 = SMA(21)[0];
double _ema34 = EMA(34)[0];
double _ema55 = EMA(55)[0];
double _ema89 = EMA(89)[0];

Having the ability to plot this in multiple timeframes on same chart would be very helpful.
5 * whoisthere48 August 29th, 2011 06:15 PM
Thanks much for making this. I just heard about it from Perry G. It it VERY useful and would be even MORE useful if I could make the UP COLORED GREEN and the DOWN COLORED RED.
Thanks again !
Richard in Colorado
5 * bankforlife August 31st, 2011 01:44 AM
Thanks
5 * kzaorski August 31st, 2011 03:18 AM
Dzięki
5 * rainbowchaser August 31st, 2011 10:50 AM
thanks a lot, Danke

 
Sort by

 




© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, 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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top