Protected Highs & Lows Indicator
Created 30 Mar 2024
·
Updated 18 Oct 2024
The NinjaTrader 8 Highs & Lows indicator is a Free NinjaTrader 8 indicator that presents an alternative approach to identifying Market Structure, inspired by the TradingView indicator Protected Highs & Lows [TFO]. An Advanced Premium version with additional features is also available.
Prerequisites
To properly use this indicator you should have the following prerequisites available.
- NinjaTrader 8, with any license type. Click here to download
- Order Flow data is not required to use this indicator — you don't need a Lifetime license.
- An automated-trading.ch account with an active Free account (no paid subscription required)
Description
This indicator introduces the concept of protected swing pivot points, used to determine market structure events such as:
- MSS: Change of Structure (or Change of Character, or Market Structure Shift) — indicates the trend might change
- BOS: Break of Structure (or Market Structure Break) — indicates a continuation of the trend
What are protected swings?
When price closes below a valid swing low, the indicator looks back from the current bar to find the highest high made in that range — that becomes the protected high. Similarly, when price closes above a valid swing high, it looks back to find the lowest low made in that range, which becomes the protected low.
If a higher high is established but the price doesn't later close below the last established lower low, that higher high isn't considered a protected swing — and the same applies symmetrically on the low side.
Examples
Market Structure Shift & Market Structure Break based on protected swings
On MNQ on the 2000-volume timeframe, the pivot swing arrows shown in red and green above and below the candlesticks are protected swings.
Features
The Protected Highs & Lows indicator has a set of unique features:
- Free — the indicator is completely free to use
- Plots Break of Structure and Change of Structure
- Highly customizable, lightweight, and adaptable to a wide range of instruments
Parameters
We always try to keep the parameters to a minimum.
| Swings | |
| Swing Period | Swings are higher lows, higher highs, lower highs, and lower lows. After each price bar close, a swing can be detected, but the next bar (or the second, or third...) can cancel it by creating a new swing of the same type. This parameter sets how many bars is enough to separate two swings of the same type — the higher this value, the fewer swings overall; the lower, the more swings. A value of 3 or 4 is a common choice. |
| Run on Higher Timeframe | Runs the swing detection algorithm on a higher timeframe, drawn on the current active chart timeframe. |
| Higher TimeFrame | Selects the higher timeframe on which swing points are detected. Make sure to select a timeframe higher than the active chart's, or the indicator won't work. |
| Higher TimeFrame Period | Sets the period of the higher timeframe. |
| Structures | |
| Show Structures |
Sets which market structure to show/hide:
|
| Show Valid Swings | Enables/disables drawing of valid swings as a circle. |
| Extend Retracement Bars | Number of bars to extend the retracement levels. |
| Play Sound | Enables playing an alert sound when an event (MSS or BOS) is detected. |
| Play Sound On Valid Swings | Enables playing a sound when a valid swing is detected. |
| Play Sound File | The file name played on sound alert — can be set to any .wav file on your computer. |
| Rendering | |
| Retracement Color | Draw color of retracement levels. |
| Bearish Color | Draw color of bearish items. |
| Bullish Color | Draw color of bullish items. |
| Draw Offset (Points) | An offset, in points, used when drawing markers of swings and valid swings on the chart. |
Download & Installation Instructions
License Requirements
At automated-trading.ch you can choose to either purchase a monthly subscription to use our premium products, or use our free products without subscribing.
In both cases, you need to create an account so you can get a License you can use for both premium and free products.
To obtain your license, simply sign up and then get your license on the billing page.
Download
You can also download this strategy — and every other automated-trading.ch strategy or indicator — anytime from your centralized Downloads page.
Installation Steps
Frequently Asked Questions
General
Release Notes
- Bug Fix with index
- Added Playsound on Valid Swings
- Added Playsound; Added Offset drawing in points
- Added Retracement Color; Fixed Serialization of parameter templates
- Fixed algorithm for detecting protected highs & lows; Added drawing of retracement, valid swings; Added higher timeframe analysis
- Fixed market structure detection algorithm based on protected highs & lows only; Added None as display option
- First Release of the indicator