NinjaTrader 8 Indicators and More - gbCloseOverCloseTrendMap
futures io

Categories Help    

NinjaTrader 8 Indicators and More
Indicators and Files in this section are compatible with NinjaTrader 8

gbCloseOverCloseTrendMap 5 *
gbCloseOverCloseTrendMap, Ver 1.0, TraderGB, May 19, 2021

Description: Compares the current close to the closes of each of the last N-bars, where N is the number entered for Lookback. The top line of the trend map is colored green if the current close closed above the close one bar back and red if it closed below. The second line of the trend map follows the same color scheme but for two bars back, etc. This is done for N-bars back. I don't really care about a close that's the same as a close N-bars ago so I just assigned these to the downtrend.

The separate plot above the trend map is an indication of the trend. It switches to an uptrend if the current close is above all N previous closes and switches to a downtrend if the current close is below all N previous closes.

There is a separate transparent plot called TrendValue that can be used for those wanting to include this in Market Analyzer. A value of 1 indicates an uptrend and a value of -1 indicates a downtrend.

This script is dynamic with respect to the number of plots that appear in the trend map. If you enter 5 for the Lookback, you will get 5 lines in the trend map. If you enter 10, you get 10 lines, etc. The indicator allows a Lookback of 20 max, which I consider more than enough. But, if you do want more plots, feel free to modify the code to allow Lookback to take a higher max value. Keep in mind that there will be a plot for whatever number you choose. For example, if you change it to a max of 100 and enter 100 as the Lookback, you'll get 100 plots. I wouldn't go to crazy here so use whatever you think makes sense for your application of the indicator.

The order of the closes in the trend map are in descending order from the top down. This means that the top line of the trend map will be the Close status 1 bar back. The second line will be the Close status for 2 bars back, etc. The last line will always be the most distant Close. For example, if you enter 10 for the Lookback, the last line of the trend map will be the status of the current Close relative to the Close 10 bars back.

Special Note: Although this indicator has in its name "CloseOverClose" it actually uses 'Input' rather than 'Close' as the input series. What this means is that you can feed most indicators into gbCloseOverCloseTrendMap to get a trend map of that indicator. For example, instead of using Close as the input series, letís say we use the Fisher transform to get a trend map of the Fisher transform. You can do this same thing with a moving average or any other indicator that seems logical for doing this. In a generic sense, the indicator is just comparing the current output with the output of 1-bar ago, 2-bars ago...N-bars ago. The detail of all these comparisons is shown in the trend map and summarized in the overall trend plot.

Category NinjaTrader 8 Indicators and More 
Suggest other entries I might like
Details: gbCloseOverCloseTrendMap
Category: NinjaTrader 8 Indicators and More 

May 19th, 2021
Size: 3.66 KB
Downloaded: 156 times


Copyright © 2021 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.