Thursday, October 24, 2024

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 ( Simple Moving Average )

The Keltner envelope lines visible in Cyan on the picture, are following a simple moving average of the Median.
The distance between the upper envelope and the midline is Y times the ATR of the last N Bars, where N is the Period of the SMA ( Simple Moving Average )

As we can see on the picture the center line of both envelopes is slightly different because both are SMA's with the same Period, but one is looking at the Closes while the other at the Medians, but the difference can be ignored as it is less than 1 tick.

As we can see also on the picture, the are where the market is on sideways the bollinger ( blue lines ) is inside the keltner ( cyan lines ).
We will name those as squeeze bars.
When the Bollinger gets outside of the Keltner we get a Squeeze Signal.
Those Squeeze Signals dont have direction, so we need to decide if entering long or short by looking somewhere else.
One possible method is looking at the slope of the midline, so we take longs or shorts depending if the slope is positive or negative.
Another option is using a different trade setup as we are doing here :

On the Darvas Squeeze Combo we search for a Squeeze Signal ( with no direction ) near a Darvas Signal ( which has a direction ). And when both signals are close enough, at no more than Z Bars of distance then we have a combo signal.



Custom Indicator TIS_Darvas_Squeeze

The Parameters of this indicator allow to define any of the Darvas, Bollinger, Keltner settings and also some parameters of the Setup :
  • Period : this is the Period of the SMA, Bollinger & Keltner, the ATR ( used by Keltner ) and Std Dev ( used by Bollinger )
  • Bollinger NumStdDev : is the multiplier of the Std Dev used on the Bollinger
  • Keltner Offset Multiplier : is the multiplier of the ATR used on the Keltner.
  • Squeeze Bars Length : is the number of squeeze bars required to trigger a Squeeze Signal
  • Break Bars : is the max distance in bars between the Squeeze and DarvasSignals 

Youtube Videos :






Tuesday, October 8, 2024

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 :

Use the coupon code HALO19 and get a 15% Discount !




Pablo




Tuesday, August 27, 2024

EDGE Trade Setup for NinjaTrader 8

 The EDGE

This is a very powerful setup that we can follow with just 2 indicators present on all platforms :

  • a moving average ( the line we want to trade )
  • a Donchian Channel ( use to define the Logic State )


This setups has 3 possible States :
  1. Looking for a Long ( when the market is trending up )
  2. Looking for a Short ( when the market is trending down )
  3. Neutral ( when market is sideways or consolidating )

The logic State is as follows :

When the lower line of the donchian goes above the mobing average the system starts looking for a Long :



When the upper line of the Donchian goes below the moving average, the system starts looking for a Short :


Then we have multiple options to define an entry using different bar patterns.
Example :

Setup #1 ( Classic )
  • the logic is looking for a long
  • the current bar low is equal or lower than the moving average
  • the previous bar low is higher than the moving average


Setup #2 ( Advanced )
  • the logic is looking for a long
  • the current low is higher than the moving average
  • the previous low was equal or lower than the moving average

As we can see, the setup #1 ( Classic ) is riskier than the setup #2 ( Advanced ), because the Classic enters the market as soon it touches the entry line, instead, the Advanced waits for the market to advance in the direction of the trade, but of course, it enters later.

Another option is using limit orders, but this option will be analyzed on a future post & video.

So, we have a logic to define what are we searching for.
Then, 2 trades setups to be used to define an entry.

We can also add filters, as follows :
  • Bar Color in agrement : take longs only if the bar is green and shorts only when it is red
  • Close in agrement : take longs when the close is above the entry line, and shorts when it is below

So, looking at the previous example, where we have 2 Signals :
Both Classic & Advanced have Close in Agrement, but only the Advanced has Color in agreement.



This other example show a Classic Short Entry (1st red triangle from the left) where the color is not in agreement and the Close is also not in agreement


The Advanced entry ( 2nd red triangle ) has both filters in agrement.

As we can see the EDGE is flexible and can be configured in multiple way, so not only the moving average period and donchian channel size are important, but also the extra filters that we can add, like the color and close agreements.

Not to mention the repeat filter option ; 
  1. take all the signals ( no filter )
  2. take only one long and then wait for a short ( one trade per side )
  3. after entering a trade reset the logic to neutral, so we need the moving average to move outside of the channel to be trade ready again ( one trade per cycle )

Examples :


One trade per side

One trade per cycle

No Filter



Find more info about this setup and our custom indicator TIS_EDGE on this video :





You can purchase our custom indicator TIS_EDGE at :




Thursday, August 22, 2024

Is the MACD an Awesome Indicator ?

How to use the MACD

A comparisson with the Awesome Oscillator.


1) What is a MACD ?

The MACD Indicator has 3 lines, so lets go one by one :

MACD = Distance between 2 Exponential Moving Averages : EMA(Fast)-EMA(Slow)

Average = an average of the MACD line : EMA(MACD,Smooth)

Diff = Distance between the MACD and its Average : MACD - Avg



That means that when the MACD crosses the zero, both moving averages are crossing.

By the sign of the MACD we can also detect if the Fast Moving Average is above or Below the Slow Moving Average. This is a method to define if the Market is going up or down.


As a comparisson, the Wiseman Awesome Oscillator does exactly the same but with SMA's instead of EMA's, and the periods are fixed to 5 & 34



The Awesome Oscillator has only one line, the equivalent to the MACD, but the MACD has another two lines :


The Avg is an exponential moving average of the MACD line, so its the smoothed version of the MACD.

This line is sometimes useful to create the EMA Crossover Signals, because with the Smooth Period we can decrease the noise, and fake signals.


The last line is the Diff, or Difference, the classic histogram.

This line is the distance between the Macd and its Average.

So, we can detect the crossover between the Macd and its Average by looking at the crosses by zero of the Diff.

This cross represents the moment when the two lines (Fast & Slow EMA's) stop moving away from each other and start coming closer together.

So, its an early signal of a possible moving average crossover



Possible Trade Setups

1) EMA(Fast) Cross EMA(Slow)

We can use the Avg of MACD(Fast, Slow, Smooth) detecting when it crosses the zero

2) MACD Pullback Continuation

This setup consists of detecting the moment when the distance between the fast and slow averages begins to increase after having been decreasing but without going below zero for a Long Signal.

Similarly, the moment when the distance between the fast and slow averages begins to increase after having been decreasing but without passing above zero are now Short Signals :



Watch the related Video :









Tuesday, August 13, 2024

Do It Yourself - How to Create a Strategy on NinjaTrader 8

 


BUILDER

The Tool to Create NinjaTrader Strategies


Click on New, Strategy Builder...




Choose a Name and click Next


Click Next


Here we define the Custom Series that we are going to use.
By now, we can skip this section and click Next

Now we add the input parameters of the strategy ; Target, Stop, Periods, and input parameters of all the indicators we are planning to use.

Example : If we want to create a Moving Average Crossover, then we need :
  1. Target
  2. Stop
  3. Period of Fast Moving Average
  4. Period of Slow Moving Average



After adding all the input parameters and variables ( we will cover this on future posts ) we click on Next


And now we reach to the most important part of Builder ; where we create the logic.

On the upper panel we add all the conditions that simulatneously must be true to trigger an action :

On the Lower Panel we add all the Actions that we want to execute when the conditions abover are all true.

Clicking Add on the Upper panel we get the panel to define logics :



The Logic is always composed by 3 sections :
  • Left Panel
  • Condition
  • Right Panel
The panels ( left & right ) can be :
  • Indicator : any plot from any indicator
  • Price : any part of a bar ( high, low, open, close )
  • Strategy : parameters of the strategy like position, Pnl, etc
  • Misc : misc functions, like numeric value, etc...
  • Time : time related functions, like the time of current bar
  • User Input : any of the input paramters we defined at the begining
The condition can be less, greater, and several other combinations.

To detect the Crossover then we place the fast moving average indicator on the left panel, the slow moving average indicator on the right panel, and the condition is cross above :

In this example, the periods of the fast & slow moving averages, were linked to the input parameters clicking on set.

After adding all the conditions we return to the Conditions & Actions Window

And now we can click on the lower panel Add button to add an action.
An Action can be painting a signal, executing an order, sending an email, playing a sound, etc.

At the begining, before placing orders it is a good practice to just draw a signal to check if it works properly on a chart.

The easiest signal to draw is painting the Background, because it doesnt need coordinates, just the color :


Now, to create the short conditions, we can replicate the logic used for the longs doing right click over the tab "Set 1"


And we get 2 tabs doing exactly the same, so we can edit the logic at the top ( instead of cross Above, use Cross Below ) and the Action at the bottom ( just change the color in this case )


Now that we have the 2 tabs properly configured, one for longs and the other for shorts, and taking into account that we are not placing orders yet, we can click on compile and add the strategy to a chart.

Right clicking a chart we get a menu where we can select Strategies...

Select the strategy we just created ( MyCustomStrategy ) , conmfigure the parameters ( Target, Stop, Fast_Period, Slow_Period ) and turn on the Enable option :


We get the signals painted on the chart :



If everything is working as expected we can continue adding entry orders, target and stop :

First, select the Tab 1 and click on the add button of the lower panel :
This time we double click "Order Management" and add an EnterLong Order



We do the same on the Tab 2, but adding an Enter Short Order :



Now we can click on Next, where we finish the strategy adding a target and stop :



We map the VAlue of the Target size to the input parameter Target clicking on set
As we defined the input parameter as an integer with the intention of using ticks, then we select the Mode equal to Ticks

Repeat the process to add a Stop Loss, attached to the input parameter Stop



Now we can click on Next, Finish and refresh the Strategy on the Chart

To refresh a strategy we can right click the chart, select strategies, turn off the enable option, click apply, turn on enable and click on Apply again.

Or, a faster method is clicking twice the Enable option on Control Center, in the Strategies Tab :



Looking at the Chart, now we can see the historical trades.
If the trades are not visible, check that you have enabled the plot executions option in your chart : right click the chart, select dataseries and go to the bottom :

If we want to change a parameter, like for example increasing the size of the targets and/or stops, we right click the strategy

And as the strategy is working, the parameters can not be edited, so we click on Enabled to turn it off and then on Apply

( We can also turn off the strategy from Control Center with just 1 click )

Now we can edit the parameters and clik Enable, Apply again :



Now we get the updated historical results of the strategy :


On following posts I will explain more details about using Builder and Strategy Analyzer.

Please Comment & Share !





Pablo