Skip to main content

TIS_HMA_Crossover Indicator for NinjaTrader

The TIS_HMA_Crossover Indicator for NinjaTrader follows the Setup described on this video :
and it uses 2 lines :
  • A fast HMA
  • A Slow Linear Regression
And as many may think, we are not looking for the crossover between those 2 lines....no...

The Entry signals are produced by the HMA line crossing with a copy of itself, displaced 1 bar :

Here we have a chart with a fast HMA , using a period of 33 :


And now, we add another HMA, with the same period but displaced 1 bar using the displacement input parameter.
On this chart, it is in color blue :

If we look at where those crossovers happen, these are our entry points

Lets go to the results painted by the custom indicator TIS_HMA_Crossover, where the signals are the blue and red triangles : ( ignore the black line by now )


As we can see, we get signals where the red line changes its slope from trending up to down and so on...

Now, lets describe the black line ; it is a linear regression because its main feature is to remain linear, so its a good way to define a trend, given the last N bars.
We use the Black Line as a Filter ; when it is sloping up, we only take long signals, when it is sloping down, we only take short signals.

Here is an example, where we avoid the first 2 shorts because the black line on those bars is sloping up :


Something to take into account is the way to measure the slope.
I do not use angles, because the result is relative to the chart X-Y compression ; if we expand the X axis, the angle change...
I use something very simple, but effective : the slope of a line is the difference between the current value and the value 1 bar back.
To calculate that, we can use the Momentum Indicator, with a period of 1, and placing inside the input series, the indicator whose slope we want to measure.
And we get something like this :

We can see the relation between the slope of the red line and the histogram ; when the red line is flat ( horizontal ), the histogram is zero. When the red line is sloping down, the histogram is negative.
So we can measure the slope and get not only its trend, up or down, but also its magnitude.
Then we can define our filter to take longs when the slope is positive and bigger than a threshold, and take shorts when the slope is negative and below a threshold.
On this example, a threshold of 0.2 seems to work fine, because we avoid the long ( blue triangle ) but take the short ( red triangle ):


In a similar way, we can also specify a threshold for the Red Line, to avoid creating fake signals when it is oscillating on an almost horizontal state.
That way, in total we have 4 input parameters for this setup :

  1. Period of the HMA , the red line that creates the Entry Signals
  2. Period of the LinReg, the black line used to filter the entry signals
  3. Threshold for the HMA, to reduce the number of fake signals
  4. Threshold fo the LinReg, to define a consolidation are where not taking any trade
As we can see on the settings of the indicator we have these 4 input parameters:


And also the option to paint the background with the trend defined by the slope of the black line.
And as we can see on this chart, if we use a threshold different than zero, then we have 3 possible background trend colors ; trending up, trending down and no trending :



This logic can be easily implemented with the Strategy Builder on NinjaTrader 8 and the Indicator TIS_HMA_Crossover includes an open code strategy so you can edit the code, learn how it works, execute performance reports and modify the logic to create your own Setup.

Contact me for more info at Pablo@TheIndicatorStore.Com

Visit our Free Chat Room on Discord : http://bit.ly/TIS_Room


Pablo Maglio
photo
The Indicator Store
Skype Skype id : pmaglio
     
Risks


Comments

Popular posts from this blog

Best ATR Trend Indicator for NinjaTrader 8

 If you are looking for an indicator to define the Trend that adapts to different market conditions, the TIS_ATR_Trend is the ... Best Trend Indicator for NinjaTrader 8 . This is how the indicator looks on UniRenko using the fastest settings : These are the indicator parameters : With the ATR Multiplier we can adjust the sensibility to change the trend, here we have an example using a value of 1 To the extreme of using zero : But even using a so sensible set of parameters we can filter those lot of signals using the included filter, like this : Here we have an example without filter but with an ATR multiplier of 2 The indicator includes so we can automate the signals or read the trend from another software, like Builder, ninjascript, Markers, etc. I will post here a YouTube Video as soon it is loaded : You can purchase this indicator at The Indicator Store on this link : https://theindicatormarket.com/depot/New/TIS_ATR_Trend Use the coupon code HALO19 and get a 15% Discount ! VI...

How to Use NinjaTrader Templates to Save, Load, and Transfer Chart Setups

 Learn how to save, load, and transfer NinjaTrader chart templates . This guide explains how to use .xml and .zip templates, install custom indicators, and set up your VPS with ease. Do you often find yourself recreating the same chart layout in NinjaTrader? Whether you're trading from a local PC or a remote VPS, NinjaTrader templates can help you save and replicate complete chart configurations — fast and error-free. In this blog post, you’ll learn how to: Save and load chart templates in NinjaTrader Transfer templates between computers or to a VPS Install vendor-provided .zip templates with indicators and strategies Troubleshoot common template errors (like missing indicators) Let’s dive in. 🧩 What Are NinjaTrader Templates? A NinjaTrader template is a saved configuration file (usually .xml ) that stores all settings from a chart, including: Indicator parameters Chart style (candlestick, Renko, tick, etc.) Bar types and timeframes Colors, fo...

Setup Darvas Squeeze - The Best Indicator Combo for NinjaTrader 8

  This setup is the confluence of 2 different Trade Setups : Setup #1 : Darvas The Darvas Indicator is included with NinjaTrader and it draw 2 lines as shown on the picture When the price crosses one of the lines it is a signal. The only special consideration about this indicator is that it redraws, so what we see on the Chart is not what is visible real time, but once the box is drawn in real time, if the price breaks it we have a signal. This system has no parameters, so the only variable we have is the timeframe, and also it is suggested to filter it with some other tool, as we are doing here. Setup #2 : Squeeze This setup uses 2 indicators, also present on NinjaTrader or any standard platform ;  Bollinger Keltner Channel The Bollinger envelope lines visible in orange on the picture, are following a simple moving average of the Close. The distance between the upper envelope and the midline is X times the Std Deviation of the last N Bars, where N is the Period of the SMA ( S...