Bearish Harmonics Documentation [EN]

The Bearish Harmonics indicator will help you trade harmonic patterns with ease. It recognizes the twelve most favourable Bearish harmonic patterns. It displays the figures with sell signals and price targets on your charts. The associated screener will help you discover trade opportunities in real-time.

Bearish Harmonics Indicator Prorealtime Documentation

Indicator Installation

Before installing the indicator, you must purchase a license or subscribe to the trial version. The indicator is available on the Prorealcode marketplace at this address:

https://market.prorealcode.com/product/bearish-harmonic-patterns-indicator-screener

Installing the indicator is a quick and easy process. Follow the standard installation procedure described on this page:

https://market.prorealcode.com/how-to-install-my-product-in-prorealtime

Launching the Indicator

After installing the license on your Prorealtime platform, the indicator will be available in the Indicators & Trading Systems window in the “ProRealCode MarketPlace” section.

To access the indicators window, click on the “Price” icon located in the price chart window, then on “Add Indicator…“:

Add Indicator Prorealtime

To access the indicator, refer to the “ProRealCode MarketPlace” section or type the name “Bearish Harmonics” in the search bar. Double-click on the “Bearish Harmonics” indicator to display it in the price window:

Bearish Harmonics Indicator Launching

Why does the price chart become flat after loading the indicator?

The indicators return buy and sell signals. This allows you to use the indicator to create alerts and backtests. It returns 1 for buy signals and -1 for sell signals. These values ​​are displayed by default on the price chart. This automatically adjusts the chart size, making it flat.

To avoid having to readjust the price chart, follow these steps:

  1. Double-click on the price chart
  2. Open the indicator configuration window
  3. Scroll to the bottom of the window
  4. Uncheck the boxes in the “Line” column (which can be called “Signal”, “Breakout”, “Crossing”, etc.)

The price chart will readjust; you won’t need to repeat this action. If the problem persists, you can uncheck the stoploss and targets. The indicator already displays these.

Indicator Configuration

The Bearish Harmonics indicator is fully configurable. It offers numerous options that enable you to tailor the indicator to your specific needs. You can choose the type of harmonic patterns, display Fibonacci levels, allow sell signals to, apply filters, set price target levels, and change the display.

Accessing the Control Panel

To access the indicator control panel, click the indicator tab at the top of the price chart window and then click “Configure“:

Bearish Harmonics Setting Panel Access

The indicator configuration window will open and allow you to configure it according to your wishes:

Selecting Harmonic Patterns

You can select the type of harmonic patterns the indicator will look for on the price chart. To do this, check the corresponding box(es):

Bearish Harmonics Patterns Selector

Pattern Size

The indicator uses an oscillator to identify peaks and troughs, thereby revealing harmonic patterns. You can set the oscillator’s period with the “Oscilator Period” parameter:

Harmonic Pattern Dimension

Sell Zone Length

When the indicator has identified a harmonic pattern, it plots sell zones and breakout lines to detect signals. You can set the length of the sell zones and breakout lines with the “Zone & Line Lengths” parameter:

Harmonic Pattern Dimension

Sell Signal Selection

The indicator detects sell signals specific to each pattern. It integrates several types of signals to help you adapt to each situation. You can open reversal, recovery, and downtrend continuation positions.

Here are the types of sell signals detected by the Bearish Harmonics indicator:

Bearish ReversalDown trend ResumptionDown trend Continuation
Price in Sell Zone
Breakout of Sell Zone
Test of Sell Zone

Breakout of Bottom Trendline
Test of Bottom Trendline
Breakout of Top Trendline
Test of Top Trendline  
Breakout of Support
Test of Support

You can select the types of sell signals by checking the corresponding box(es):

Sell Signals Selector

Here are examples of sell signals detected by the Bearish Harmonics indicator:

Harmonic Pattern Sell Zone Signal
Price in Sell Zone
Harmonic Pattern Top Line Breakout
Top Line Breakout
Harmonic Pattern Trendline Breakout
Trendline Breakout
Harmonic Pattern Support Breakout
Support Breakout

Pattern Detection

You can display the moment a pattern is detected by checking the “Figure Detection” box. In this case, the indicator will consider the pattern detection as a sell signal:

Figure Detection Validated Signals

Signal Validation

You can enable signal validation by checking the “Validated Signals” box. In this case, the indicator will only display validated signals.

Figure Detection Validated Signals

Volume Filter

You can filter signals only if they are accompanied by volume. To do this, click the “with Volumes” option:

Volume Divergence Filters

Divergence Filter

You can filter signals only if there is a bearish divergence. To do this, click the “with Divergence” option:

Volume Divergence Filters

Trend Filters

You can filter signals according to the market trend:

  • The “In the Trend” option only retains sell signals appearing in a downtrend.
  • The “Reversal” option only retains sell signals appearing in an uptrend.
Trend Filters

Price Target and Safety Stop

The indicator uses the pattern construction points to calculate Fibonacci ratios. These ratios will be used to define specific price targets.

  • You can choose to display these levels by checking the “Take Profit” and “Stop-Loss” boxes.
  • You can adjust these levels with the “TP Level” and “SL Level” parameters.
Target and Stoploss

Fibonacci Levels

You can display the Fibonacci extensions associated with each harmonic pattern with the “Display Fibonacci Levels” option.

You can set the number of Fibonacci levels the indicator will display with the “Fibonacci Levels” option.

Display Options

The Bearish Harmonics indicator contains options that allow you to customize the indicator’s display:

Bullish Harmonics Display Options

Here is the list of options and their meanings:

OptionsSignifications
Fibonacci ProlongationExtension of the display of Fibonacci levels
TransparencyTransparency of patterns, sell zones, and Fibonacci zones
Figure ColorColor of harmonic patterns
Sell Zone ColorColor of the sell zones and trendlines
TP ColorColor of the price target
SL ColorColor of the safety stop
Line ThicknessThickness of the lines of patterns, zones, price targets, and safety stops
Font SizeFont size for displaying text data
Display Figure NameDisplays the names of detected patterns

Data Returned by the Indicator

The Bearish Harmonics indicator returns data that you can use to create alerts and backtest strategies.

Here is the data returned by the indicator, along with its descriptions:

DataDescription
SignalSell Signal
Target ShortPrice Target Value
Stop Loss ShortSafety Stop Value
FibonacciValue of the selected Fibonacci level
P 1Value of the first construction point of the pattern
P 2Value of the second construction point of the pattern
P 3Value of the third construction point of the pattern
P 4Value of the fourth construction point of the pattern
P 5Value of the fifth construction point of the pattern

Backtesting and Automated Trading

You can integrate the indicator into a backtest to test a configuration. To do this, you must use the “CALL” function:

mySignal, myTargetShort, myStopLossShort, myFibonacci, myP1, myP2, myP3, myP4, myP5 = CALL "Bearish Harmonics"[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 50, 50, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 7, 1, 2, 1, 8, 50, 5, 14, 11, 2, 1, 3, 5, 1](close)

Indicator Returns

The Bearish Harmonics indicator provides all the information you need to backtest a strategy or create a trading robot. Here are the indicators’ returns and descriptions:

DataDescription
mySignalSell Signal
myTargetShortPrice Target Value
myStopLossShortSafety Stop Value
myFibonacciValue of the selected Fibonacci level
myP1, myP2, myP3, myP4, myP5Value of the building points of the figures

Calling the indicator in a backtest

To call the indicator in a backtest, you must pass it its configuration parameters. I’ve created sample code to help you integrate the indicator into a strategy. The variable names are the same as those in the indicator.

The following code calls the Bearish Harmonics indicator. It will open short positions if a sell signal is detected:

//--------------------------------------------------------//
// *** Advanced Bearish Harmonics Backtest  *** //
//--------------------------------------------------------//
// * Author: Vivien Schmitt
// * Website: https://artificall.com
// * Indicator: Advanced Bearish Harmonics
// * Indicapor Description: https://artificall.com/indicator/prt/bearish-harmonic-patterns/
// * Marketplace:
// * Documentation:
// FR: https://artificall.com/docs/advanced-harmonics/documentation-bearish-harmonics-fr/
// EN: https://artificall.com/docs/advanced-harmonics/bearish-harmonics-documentation-en/
//--------------------------------------------------------//

DEFPARAM CUMULATEORDERS = False
DEFPARAM PRELOADBARS = 1000


//--------------------------------------------------------//
// *** POSITION SIZE *** //
//--------------------------------------------------------//
// Capital to invest
ONCE CapitalToInvest = 10000
// Minimum number of contracts
ONCE NumberOfContractsMin = 1
// Position Size
NumberOfContracts = MAX(ROUND(CapitalToInvest / Close, 2), NumberOfContractsMin)


//--------------------------------------------------------//
// *** SETTING BLOCK *** //
//--------------------------------------------------------//

// * Figure Selector
ONCE BearishButterfly = 1
ONCE BearishGartley = 1
ONCE BearishBat = 1
ONCE BearishAltBat = 1
ONCE BearishCrab = 1
ONCE BearishDeepCrab = 1
ONCE BearishCypher = 0
ONCE BearishShark = 0
ONCE Bearish50Pattern = 0
ONCE BearishThreeDrives = 0
ONCE BearishABCD = 0
ONCE BearishAltABCD = 0

// Figure and Line Sizes
ONCE OscilatorPeriod = 50
ONCE ZoneLengths = 50

// * Signals
ONCE SellZone = 0
ONCE PriceInZone = 1
ONCE PriceBreaksZone = 1
ONCE PriceTestsZone = 1
ONCE HorizontalBreakout = 1
ONCE HorizontalTest = 1
ONCE TopTrendLineBreakout = 1
ONCE TopTrendLineTest = 1
ONCE BottomTrendLineBreakout = 1
ONCE BottomTrendLineTest = 1

ONCE FigureDetection = 0
ONCE ValidatedSignals = 1

// * Flters
ONCE WithVolume = 1
ONCE WithDivergence = 1
ONCE InTheTrend = 0
ONCE Reversal = 0

// * Risk Management
ONCE TargetActivation = 1
ONCE TPLevel = 6
ONCE StopLossActivation = 1
ONCE SLLevel = 2

// * Fibonacci
ONCE DisplayFibonacciLevels = 0
ONCE FibonacciLevels = 0
ONCE FibonacciProlongation = 0

// * Display options
ONCE Transparency = 0
ONCE FigureColor = 0
ONCE SellZoneColor = 0
ONCE TPColor = 0
ONCE SLColor = 0
ONCE LineThickness = 0
ONCE FontSize = 0
ONCE DisplayFigureName = 0


//--------------------------------------------------------//
// * INDICATOR CALLING * //
//--------------------------------------------------------//
mySignal, myTargetShort, myStopLossShort, myFibonacci, myP1, myP2, myP3, myP4, myP5 = CALL "Bearish Harmonics"[BearishButterfly, BearishGartley, BearishBat, BearishAltBat, BearishCrab, BearishDeepCrab, BearishCypher, BearishShark, Bearish50Pattern, BearishThreeDrives, BearishABCD, BearishAltABCD, OscilatorPeriod, ZoneLengths, SellZone, PriceInZone, PriceBreaksZone, PriceTestsZone, HorizontalBreakout, HorizontalTest, TopTrendLineBreakout, TopTrendLineTest, BottomTrendLineBreakout, BottomTrendLineTest, FigureDetection, ValidatedSignals, WithVolume, WithDivergence, InTheTrend, Reversal, TargetActivation, TPLevel, StopLossActivation, SLLevel, DisplayFibonacciLevels, FibonacciLevels, FibonacciProlongation, Transparency, FigureColor, SellZoneColor, TPColor, SLColor, LineThickness, FontSize, DisplayFigureName](close)


//--------------------------------------------------------//
// *** Selling Conditions *** //
//--------------------------------------------------------//
IF NOT ShortOnMarket AND mySignal THEN
  // Target price
  Set Target Price myTargetShort
  // Stop-Loss price
  Set Stop Price myStopLossShort
  // Selling order
  SELLSHORT NumberOfContracts CONTRACTS AT MARKET
ENDIF

Backtest Results

Here is the result of the previous code run on the Google stock in the daily timeframe:

Harmonic Pattern Screener

The screener provided with the indicator will help you identify opportunities in real-time. You can detect the occurrence of the twelve bearish harmonic patterns recognized by the indicator, along with sell signals. You can apply them to predefined or custom lists, across all asset classes and all time frames.

Installing the Screener

The screener installation procedure is identical to that of the indicator. You will need to upload the license key to your Prorealtime platform.

To access the screener, follow these steps:

Open the ProScreener Window

You can open the ProScreener window by clicking on “View” then “ProScreener“, or by using the shortcut “Ctrl-E“:

ProScreener Open Window
Fenêtre ProScreener

Click the “Create or Modify a Screener” wrench in the ProScreener window:

Bullish Harmonic ProScreener Opening

Select the harmonic pattern screener

Select the screener named “Bearish Harmonics Scan“:

Bearish Harmonic Screener Setting Panel

Screener Configuration

The screener uses the same parameters as the indicator, except for the risk management and display options, which are not required for the scanner’s operation.

Harmonic Pattern Selection

You can select the harmonic patterns of your choice by checking the corresponding boxes:

Bearish Harmonic Screener Pattern Selector

Pattern Size

You can define the pattern size using the “Period” and “ZoneLengths” parameters:

Pattern Dimension

Signal Selection

You can select the signals of your choice by checking the corresponding boxes:

Bearish Harmonic Screener Signals

Signal Filters

You can filter signals based on their validation, volume, market strength, and trend by checking the corresponding boxes:

Bullish Harmonic Screener Signal Filters

Timeframe and Asset List

The timeframe and asset list can be selected in the “ProScreener Management” window.

Choosing the Timeframe

You can choose the timeframe in which the screener will search for opportunities:

Bearish Harmonic Screener Period

Select a List of Assets

You must select a list in which you want to search for opportunities:

Bearish Harmonic Screener Asset List

Launch the Screener

You can now launch the screener by clicking the “Run ProScreener” button:

Bearish Harmonic Screener Running

Screener Results

After launching the screener, the discovered opportunities will appear in the results list. Simply click on a line to display it on the price chart:

Bearish Harmonic Scanner Prorealtime

Increase the number of opportunities

If the screener doesn’t return any results, it means that no stocks match your configuration. Here are some actions you can take to increase the number of opportunities found by the screener:

  • Reduce the oscillator period
  • Disable volume and strength filters
  • Disable trend filters
  • Choose large asset lists like the Nasdaq and NYSE
  • Choose a lower timeframe

Note: ProScreener limits the historical access to 256 candles. As a consequence, you will not detect patterns exceeding this number of candles.

Share this Doc

Bearish Harmonics Documentation [EN]

Or copy link

CONTENTS