Bullish Harmonics Documentation [EN]

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

Bullish Harmonics Prorealime 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/bullish-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 “Bullish Harmonics” in the search bar. Double-click on the “Bullish Harmonics” indicator to display it in the price window:

Indicator Launching

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

The indicator returns 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 Bullish 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 buy 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“:

Indicator Setting Panel Access

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

Bullish Harmonics Indicator Setting

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):

Bullish Harmonic 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

Buy Zone Length

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

Harmonic Pattern Dimension

Buy Signal Selection

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

Here are the types of buy signals detected by the Bullish Harmonics indicator:

Bullish ReversalUptrend ResumptionUptrend Continuation
Price in Buy Zone
Breakout of Buy Zone
Test of Buy Zone

Breakout of Bottom Trendline
Test of Bottom Trendline
Breakout of Top Trendline
Test of Top Trendline  
Breakout of Resistance
Test of Resistance

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

Buy Signals Selector

Here are some examples of buy signals detected by the Bullish Harmonics indicator:

Harmonic Pattern Buy Zone Signal
Price in Buy Zone
Harmonic Pattern Bottom Line Breakout
Bottom Line Breakout
Harmonic Pattern Trendline Breakout
Trendline Breakout
Harmonic Pattern Resistance Breakout
Resistance 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 buy 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 bullish 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 buy signals appearing in an uptrend.
  • The “Reversal” option only retains buy signals appearing in a downtrend.
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 Advanced Bullish 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, buy zones, and Fibonacci zones
Figure ColorColor of harmonic patterns
Buy Zone ColorColor of the buy 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 Bullish 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
SignalBuy Signal
Target LongPrice Target Value
Stop Loss LongSafety 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, myTargetLong, myStopLossLong, myFibonacci, myP1, myP2, myP3, myP4, myP5 = CALL "Bullish 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 Bullish 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
mySignalBuy Signal
myTargetLongPrice Target Value
myStopLossLongSafety 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 Advanced Bullish Harmonics indicator. It will open long positions if a buy signal accompanied by volume is detected:

//--------------------------------------------------------//
// *** Advanced Bullish Harmonics Backtest  *** //
//--------------------------------------------------------//
// * Author: Vivien Schmitt
// * Website: https://artificall.com
// * Indicator: Advanced Bullish Harmonics
// * Indicapor Description: https://artificall.com/indicator/prt/bullish-harmonic-patterns/
// * Marketplace:
// * Documentation:
// FR: https://artificall.com/docs/advanced-harmonics/documentation-bullish-harmonics-fr/
// EN: https://artificall.com/docs/advanced-harmonics/bullish-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 BullishButterfly = 1
ONCE BullishGartley = 1
ONCE BullishBat = 1
ONCE BullishAltBat = 1
ONCE BullishCrab = 1
ONCE BullishDeepCrab = 1
ONCE BullishCypher = 1
ONCE BullishShark = 1
ONCE Bullish50Pattern = 1
ONCE BullishThreeDrives = 1
ONCE BullishABCD = 1
ONCE BullishAltABCD = 1

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

// * Signals
ONCE BuyZone = 1
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 = 0
ONCE InTheTrend = 0
ONCE Reversal = 0

// * Risk Management
ONCE TargetActivation = 1
ONCE TPLevel = 7
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 BuyZoneColor = 0
ONCE TPColor = 0
ONCE SLColor = 0
ONCE LineThickness = 0
ONCE FontSize = 0
ONCE DisplayFigureName = 0


//--------------------------------------------------------//
// * INDICATOR CALLING * //
//--------------------------------------------------------//
mySignal, myTargetLong, myStopLossLong, myFibonacci, myP1, myP2, myP3, myP4, myP5 = CALL "Bullish Harmonics"[BullishButterfly, BullishGartley, BullishBat, BullishAltBat, BullishCrab, BullishDeepCrab, BullishCypher, BullishShark, Bullish50Pattern, BullishThreeDrives, BullishABCD, BullishAltABCD, OscilatorPeriod, ZoneLengths, BuyZone, PriceInZone, PriceBreaksZone, PriceTestsZone, HorizontalBreakout, HorizontalTest, TopTrendLineBreakout, TopTrendLineTest, BottomTrendLineBreakout, BottomTrendLineTest, FigureDetection, ValidatedSignals, WithVolume, WithDivergence, InTheTrend, Reversal, TargetActivation, TPLevel, StopLossActivation, SLLevel, DisplayFibonacciLevels, FibonacciLevels, FibonacciProlongation, Transparency, FigureColor, BuyZoneColor, TPColor, SLColor, LineThickness, FontSize, DisplayFigureName](close)


//--------------------------------------------------------//
// *** Buying Conditions *** //
//--------------------------------------------------------//
IF NOT LongOnMarket AND mySignal THEN
  // Target price
  Set Target Price myTargetLong
  // Stop-Loss price
  Set Stop Price myStoplossLong
  // Buying order
  BUY NumberOfContracts CONTRACTS AT MARKET
ENDIF

Backtest Results

Here is the result of the previous code run on the Adobe stock in the weekly timeframe:

Harmonic Pattern Backtest

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 bullish harmonic patterns recognized by the indicator, along with buy 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 “Bullish Harmonics Scan“:

Bullish 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:

Bullish Harmonic Screener Setting

Harmonic Pattern Selection

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

Bullish 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:

Bullish 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:

Bullish Harmonic Screener Period

Select a List of Assets

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

Bullish Harmonic Screener Asset List

Launch the Screener

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

Bullish 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:

Bullish 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

Bullish Harmonics Documentation [EN]

Or copy link

CONTENTS