Ultimate Breaker Documentation
Presentation of the indicator
What is the Ultimate Breaker?
The Ultimate Breaker is an indicator working on the Prorealtime platform. It detects the bullish and bearish breakouts on the main trading figures.
The indicator displays the buying and selling signals on the price chart. It also displays the targets and stoplosses. You can set the indicator to enhance the results.
What patterns does the indicator recognize?
The indicator recognizes the twelve most used figures by traders. They are derived from the four main patterns: channels, wedges, broadening, and triangles. These figures can be horizontal, descending, or ascending:
![Trading Figures](https://artificall.com/wp-content/uploads/2024/06/Ultimate_Breaker_Figure_Names_cropped_2-1024x766.png)
Indicator installation
The installation of the indicator on the Prorealtime platform is easy and quick. Here are the installation steps:
1. Get the Ultimate Breaker
The Ultimate Breaker is available on the Prorealcode Marketplace. You can get the indicator on this page:
https://market.prorealcode.com/product/ultimate-breaker
2. Get the license number
- go into your “My Account” page
- click on “My Products” tab
- copy the license number
![Marketplace Prorealcode](https://artificall.com/wp-content/uploads/2024/06/how-to-install-a-prorealcode-marketplace-licence_step1-1.webp)
Note: Your license is also sent to you by email, check your “spam” folder if necessary.
3. Install the license in ProRealTime
Adding products to your trading platform is easy!
- open the indicators & trading systems window and click on the “MarketPlace” button
- paste or retype the license number in the text field and click on OK
![Ultimate Breaker installation](https://artificall.com/wp-content/uploads/2024/06/how-to-install-a-prorealcode-marketplace-licence_step2.webp)
Find your newly installed product in the “ProRealCode MarketPlace” indicators list.
Indicator starting
You can use the indicator on any asset as a stock, index, or ETF. The following steps show you how to start the Ultimate Breaker indicator:
- Open the price chart of an asset
You need to open the price window of the asset on which you want to run the indicator. To do so, click on an asset in your list to open the price chart on the Prorealtime platform.
- Click on the “Price” icon
The Ultimate Breaker will display data on the price chart. You must run it in the graphical mode. To do so, you must click on the “Price” icon on the top-left of the price chart window:
![Click on price icon](https://artificall.com/wp-content/uploads/2024/06/click_on_price_icon_highlighted-1024x663.png)
- Click on “Add an indicator”
A drop-down list will appear after clicking the “Price” icon. Click on “Add an indicator“:
![Add Indicator](https://artificall.com/wp-content/uploads/2024/06/Add_Indicator_highlighted-1024x663.png)
- Type “ULTIMATE.BREAKER” in the search bar
A window will appear after clicking on “Add an indicator“.
Start to type “Ultimate Breaker” in the search bar on the top-right of the window:
![Type ultimate breaker](https://artificall.com/wp-content/uploads/2024/06/type_ultimate_breaker_highlighted.png)
Click on the “ULTIMATE.BREAKER” indicator to run it on the price chart.
Indicator setting
Setting panel
The setting panel will allow you to make sure the indicator meets your requirements. You will choose the figures you want to trade, tweak the signals, and define the target and stoploss levels.
Setting panel access
To access the setting panel, click on the tab with the indicator’s name on the top-left of the price chart, then click on “Configure…“:
![Open configuration window_highlighted](https://artificall.com/wp-content/uploads/2024/06/open_configuration_window_highlighted.png)
Here is the setting window of the Ultimate Breaker indicator:
![Setting Panel](https://artificall.com/wp-content/uploads/2024/06/Ultimate_Breaker_Setting_Windows-1024x773.png)
Description of the setting panel
The setting panel is made of several areas containing checkboxes and textboxes, allowing you to activate and set options:
- Figures selection
- Figures dimension
- Signal filters
- Risk Management
- Additional options
- Display setting
![Indicator Setting](https://artificall.com/wp-content/uploads/2024/06/indicator_setting_highlighted.png)
![Display Data](https://artificall.com/wp-content/uploads/2024/06/display_data_highlighted.png)
1. Figure selection
Figure selector
You can select the figures of your choice by clicking on the corresponding checkbox on the settings panel. You can select several figures:
![Figure Selector](https://artificall.com/wp-content/uploads/2024/06/figure_selection.png)
Buying and sell-shorting
The figures on the left columns allow opening long entries, and those on the right columns allow sell-short entries:
- The right column figures will send buying signals when the price breaks up their resistances.
- The left column figures will send sell-short signals when the price breaks down their resistances.
2. Figure dimensions
You can set the dimensions of the figures, such as the length and height:
![Figure Properties](https://artificall.com/wp-content/uploads/2024/06/figure_properties.png)
Figure size
The size of a figure is composed of the length and its extension.
Length
The length corresponds to the number of candles composing the figure. The algorithm will use this value to recognize the figures.
Extension
The length extension allows the figure to expand. The indicator will use this extended value to detect breakouts, which will extend the figure length without impacting the recognition.
![Length Extension](https://artificall.com/wp-content/uploads/2024/06/length_extension-1024x552.png)
Figure length
You can set the length of the figure with the “Figure Length” parameter:
![Figure Length](https://artificall.com/wp-content/uploads/2024/06/Figure_Length_highlighted.png)
Length Extension
You can expand the length of the figure with the “Length Exetension” parameter:
![Length Extension](https://artificall.com/wp-content/uploads/2024/06/Length_Extension_highlighted.png)
Figure height
The figure height corresponds to the difference between the highest and the lowest price along the length of the figure. The height is indicated by a segment separating the length of a figure with its extension:
![Figure Height](https://artificall.com/wp-content/uploads/2024/06/figure_height-1024x552.png)
You can set the minimum and maximum height of the figures. These values are defined in percentage of the context. The context corresponds to four times the length of the figure:
![Figure Height Context](https://artificall.com/wp-content/uploads/2024/06/context_figure_height-1024x552.png)
Minimum height
You can set the minimum height of the figures with the “Min Height (%)” option:
![Min Height](https://artificall.com/wp-content/uploads/2024/06/Min_height_highlighted.png)
If you set 20 to the minimum height parameter for a 100-candle figure, the minimum height will be 20% of the height of the 400 last candles.
Maximum height
You can set the maximum height of the figures with the “Max Height (%)” option:
![Max Height](https://artificall.com/wp-content/uploads/2024/06/Max_Height_highlighted.png)
If you set 40 to the maximum height parameter for a 100-candle figure, the maximum height will be 40% of the height of the 400 last candles.
3. Figures and signals filtering
The indicator provides several options allowing the filtering of figures and signals. You will enhance the quality of the signals and improve the success rate of your trades:
![Filters](https://artificall.com/wp-content/uploads/2024/06/filters.png)
Figures breakout
This option will display the bullish and bearish breakouts, indicating the long and short entry openings:
![Breakout](https://artificall.com/wp-content/uploads/2024/06/breakout-1024x552.png)
You must check the “Breakout” checkbox to activate breakout detections:
![Breakout](https://artificall.com/wp-content/uploads/2024/06/Breakout__highlighted.png)
Breakout validation
The indicator allows only keeping the validated breakouts:
- A bullish breakout is validated when the price breaks up the resistance and the next candle closes above it.
- A bearish breakout is validated when the price breaks down the support and the next candle closes under it.
![Validated Breakout](https://artificall.com/wp-content/uploads/2024/06/validated_breakout-1024x552.png)
You must check the “Validated Breakout” checkbox to activate the breakout validation:
![Validated Breakout](https://artificall.com/wp-content/uploads/2024/06/Validated_Breakout__highlighted.png)
Trend
You can filter the trend preceding a figure with the “Previous Trend” option:
![Trend](https://artificall.com/wp-content/uploads/2024/06/Trend_Highlighted.png)
Values | Effets |
---|---|
Negative number | Bearish trend along a period equal to the number. |
-1 | Bearish trend along a period equal to the figure length. |
0 | No trend filter |
1 | Bullish trend along a period equal to the figure length. |
Positive number | Bullish trend along a period equal to the number. |
Volumes
You can filter the signals depending on the volumes with the “Volume Trend” option:
![Volume](https://artificall.com/wp-content/uploads/2024/06/Volume_Highlighted.png)
Here are the available values to filter the volumes:
Values | Effects |
---|---|
Negative number | Bearish volumes along a period equal to the number. |
-1 | Bearish volumes along a period equal to the figure length. |
0 | No trend filter |
1 | Bullish volumes along a period equal to the figure length. |
Positive number | Bullish volumes along a period equal to the number. |
Market strength
The indicator implements a strength filter built on the Relative Strength Index (RSI). This indicator measures the velocity and amplitude of the price change. An RSI lower than 30 is considered oversold, and an RSI greater than 70 is considered overbought.
You can filter the market strength using the “RSI 14 Min” and “RSI 14 Max” options:
![RSI Filter](https://artificall.com/wp-content/uploads/2024/06/RSI_Min_Max_Highlighted.png)
RSI Minimum
The RSI 14 Min option allows filtering signals having an RSI 14 greater than the set value:
![RSI Min](https://artificall.com/wp-content/uploads/2024/06/RSI_Min_Highlighted.png)
RSI Maximum
The RSI 14 Max option allows filtering signals having an RSI 14 lower than the set value:
![RSI Max](https://artificall.com/wp-content/uploads/2024/06/RSI_Max_Highlighted.png)
4. Risk management
The Ultimate Breaker provides risk management options. You can define the target and stop loss levels associated with each signal. The target and stop loss positions are calculated from the figure height:
![Target Stoploss Levels](https://artificall.com/wp-content/uploads/2024/06/target_stoploss_levels.png)
Target level
The target corresponds to the price at which you want to close your position to concretize your latent gain. The indicator displays several target levels. Each level corresponds to one half-height of the figure.
You can define the number of targets with the “Target Level” option:
![Target](https://artificall.com/wp-content/uploads/2024/06/target_highlighted.png)
You must set 1 to the indicator prints the first level, 2 to display the two first levels, etc. You can turn off the targets by setting 0 to this option. The following example shows the four first target levels:
![Target Level](https://artificall.com/wp-content/uploads/2024/06/target_level-1024x543.png)
Stoploss level
The stoploss corresponds to the price at which you want to close your position to limit your latent loss. The indicator allows displaying one stoploss. Each level corresponds to one quart of the figure height.
You can define the number of stoploss with the “Stoploss Level” option:
![Stoploss](https://artificall.com/wp-content/uploads/2024/06/stoploss_highlighted.png)
You must set 1 to the indicator prints the first level, 2 to display the second stoploss levels, etc. You can turn off the stoploss by setting 0 to this option. The following example shows the third first target levels:
![Stoploss Level](https://artificall.com/wp-content/uploads/2024/06/stoploss_level-1024x542.png)
5. Additional options
The indicator provides additional options for displaying and returning the data:
![Additional Options](https://artificall.com/wp-content/uploads/2024/06/additionnal_options.png)
Colours
You can set the colours of the displayed figures and texts with the “Colour (long)” and “Colour (short)” options. These two options accept positive and negative values. The positive values allow you to choose a colour, and the negative values a grey level. You have access to a palette of 15 colours and 5 grey levels.
Colour (long)
The “Colour (long)” option concerns the resistance and target colours:
![Colour long](https://artificall.com/wp-content/uploads/2024/06/Colour_long_highlighted.png)
Colour (short)
The “Colour (short)” option concerns the support and stoploss colours:
![Colour short](https://artificall.com/wp-content/uploads/2024/06/Colour_short_highlighted.png)
Example of colours
Standard colours (Green-Red)
![Standard Colour](https://artificall.com/wp-content/uploads/2024/06/standard_colour_blue-1024x552.png)
Personalized colours (White) with dark them
![Ultimate Breaker color white](https://artificall.com/wp-content/uploads/2024/06/Ultimate_Breaker_color_white-1024x552.png)
Figure Thickness
You can set the figure’s thickness with the Figure Thickness parameter. The accepted values for this parameter start from 1 until 5:
- Set 1 to display thin segments.
- Set 5 to display thick segments.
Thin figure segments
![Figure Thickness Thin descending channel](https://artificall.com/wp-content/uploads/2024/06/Figure_Thickness_Thin_descending_channel-1024x576.png)
Thick figure segments
![Figure Thickness Thick descending channel](https://artificall.com/wp-content/uploads/2024/06/Figure_Thickness_Thick_descending_channel-1024x576.png)
Font size
You can set the font size of the targets and stoploss with the ‘Font Size” option :
![Font Size](https://artificall.com/wp-content/uploads/2024/06/font_size_highlighted.png)
The font size impacts the segment’s weight, tracing the targets and stoploss. You can use a negative value to display the segment without text.
Light
You can increase or decrease the brightness of the figures, targets, and stoploss with the “Light” option. The available values come from -255 to 255:
![Light](https://artificall.com/wp-content/uploads/2024/06/light_highlighted.png)
Starting year
You can choose the year from which the indicator will start to search figures with the “Starting Year” option. That will alleviate your chart and reduce the calculation time:
![Starting Year](https://artificall.com/wp-content/uploads/2024/06/starting_year_highlighted.png)
Starting year example: 2020
If you set 2020 to the starting year option, the indicator will display the figure from the 2020 year:
![starting year](https://artificall.com/wp-content/uploads/2024/06/starting_year_2020-1024x552.png)
Starting year example: 2024
If you set 2024 to the starting year option, the indicator will display the figure from the 2024 year:
![starting year 2024](https://artificall.com/wp-content/uploads/2024/06/starting_year_2024-1024x552.png)
Return of the Data
The return of the data is necessary to implement the indicator in a backtest or to create trading alerts.
You can activate the return of the data by clicking on the “RETURN” option:
![Data Return](https://artificall.com/wp-content/uploads/2024/06/data_return_highlighted.png)
I will show you how to use this option in the alert and backtest chapters.
6. Display setting
Data activation
The indicator natively displays figures, targets, and stop losses. You may need to activate data returns to create an alert system or a backtest.
Click on the “RETURN” option to activate data return. Then, you have to check the checkboxes of the data you need:
![Display Data](https://artificall.com/wp-content/uploads/2024/06/display_data_all.png)
The targets and stop losses will printed on the chart:
![Display data on chart](https://artificall.com/wp-content/uploads/2024/06/display_data_on_chart.png)
Displaying issue after the installation of the indicator
Sometimes, the installation of the indicator flattens the price chart. This issue results from the price adjustment to the indicator’s returned data, which can be small values such as the signals (-1, 0, or 1) or the figure height.
The scaling will flatten the price chart:
![Flattening price issue](https://artificall.com/wp-content/uploads/2024/06/flattening_price_issue-1024x576.png)
If you meet this graphic issue after the indicator installation, please uncheck the “Signal” checkbox. If the problem persists, uncheck the “Height” checkbox:
![Flattening price issue solution](https://artificall.com/wp-content/uploads/2024/06/flattening_price_issue_solution_highlighted.png)
Create an alert system
The Prorealtime platform provides trading alert services. You can use the Ultimate Breaker to create alerts on the figure breakouts. I will present the steps to build trading alerts with the Ultimate Breaker indicator.
1. Configure the indicator
You must set up the Ultimate Breaker indicator before creating an alert. The Prorealtime platform will take your settings as input to send you alerts.
For example, if you have set a figure length of 100 candles with breakout validation and volume increase, the platform will send you alerts only for this configuration.
Configuration example
Here is an example of settings for what I want to receive alerts:
- Figure: Descending Channel and Falling Broadening
- Length: 100 candles
- Extension: 4
- Height Min: 20%
- Height Max: 50%
- Trend: Bullish on 100 candles
- Breakout: Validated
- Volume: Bullish on 5 candles
- RSI Min: 20
- RSI Max: 80
- Data Return: Activated
![Trading alert setting](https://artificall.com/wp-content/uploads/2024/06/trading_alert_setting_example-1024x746.png)
Here is the running of this setup on the Nasdaq in the 4-hour time unit:
![Trading alert chart](https://artificall.com/wp-content/uploads/2024/06/trading_alert_chart_example-1024x576.png)
2. Open the alert window
After you defined your setup, you must open the alert window. To do that, right-click on the price chart, then click on “Create a new alert“:
![Prorealtime Alert](https://artificall.com/wp-content/uploads/2024/06/alert_window.png)
3. Select the Ultimate Breaker indicator
You must select the Ultimate Breaker indicator to make the Prorealtime alert system use the indicator’s signals. Select the line containing the “Signal” word:
![Alert window Ultimate Breaker](https://artificall.com/wp-content/uploads/2024/06/alert_window_ultimate_breaker_highlighted.png)
4. Set the values
The Ultimate Breaker indicator returns 1 for bullish breakouts and -1 for bearish breakouts.
Select the “equal” sign and set 1 to the value to receive alerts on bullish breakouts.
It is preferable to select the current bar closing for the validity checking. You only receive validated signals, which will reduce the resources of your computer:
![Alert window parameters](https://artificall.com/wp-content/uploads/2024/06/alert_window_parameters_highlighted.png)
Note: you can write a message describing the signal in the comment area.
5. Trigger management
The triggers allow you to manage the temporality of the triggerings. In this example, the platform will send an alert for each bullish breakout:
![Alert trigger](https://artificall.com/wp-content/uploads/2024/06/alert_trigger_highlighted.png)
6. Create the alert
You only have to click on the “Create Alert” button to finalize the process:
![Create alert](https://artificall.com/wp-content/uploads/2024/06/create_alert.png)
7. Alert management
You can manage your trading alerts from the alert window. Click on the top main menu, then click on “Display“, then click on “Alert Status“, or type “Ctrl a“:
![Alert management](https://artificall.com/wp-content/uploads/2024/06/alert_management.png)
You only have to click on the alert of your choice to modify it.
You can remove an alert by clicking on the red cross on the alert Status window:
![Remove alert](https://artificall.com/wp-content/uploads/2024/06/remove_alert_highlighted.png)
Backtest & Automated Trading
You can implement the Ultimate Breaker indicator in a backtest or an automated trading system. The indicator returns all the data you need to create a strategy.
Indicator implementation in a backtest
The CALL instruction
The CALL instruction allows the indicator implementation in a backtest:
mySignal, myTargetLong, myStopLossLong, myTargetShort, myStopLossShort, myHeight = CALL "ULTIMATE.BREAKER"[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 100, 2, 20, 50, 1, 1, 0, 0, 0, 100, 4, 3, 2, 1, 3, 14, -25, 2015, 0](close)
You can use the function insertion tool to implement an indicator in a backtest. Click on the “Insert functions” button on the code editor window:
![backtest integration](https://artificall.com/wp-content/uploads/2024/06/backtest_integration_highlighted-1024x565.png)
Later, type “Ultimate Breaker“, select the indicator, and click on “Add“:
![Backtest Ultimate Breaker import](https://artificall.com/wp-content/uploads/2024/06/backtest_Ultimate_Breaker_import_highlighted.png)
The indicator will be integrated into the source code with the default parameters:
![Backtest Ultimate Breaker Integration](https://artificall.com/wp-content/uploads/2024/06/backtest_integration-1024x565.png)
Code of the indicator integration
I created a source code to help you implement the Ultimate Breaker indicator into a backtest.
The backtest will open long entries if the price breaks up ranges, symmetric broadening, or ascending triangles. The system will also open short entries if the price breaks down descending triangles:
DEFPARAM CUMULATEORDERS = False
// * Figures Selector
// Long Figures
ONCE RangeUp = 1
ONCE DescendingChannel = 0
ONCE SymmetricWedgeUp = 0
ONCE FallingWedge = 0
ONCE SymmetricBroadeningUp = 1
ONCE FallingBroadening = 0
ONCE SymmetricTriangleUp = 0
ONCE AscendingTriangle = 1
// Short Figures
ONCE RangeDown = 0
ONCE AscendingChannel = 0
ONCE SymmetricWedgeDown = 0
ONCE RisingWedge = 0
ONCE SymmetricBroadeningDown = 0
ONCE RisingBroadening = 0
ONCE SymmetricTriangleDown = 0
ONCE DescendingTriangle = 1
// * Figure Properties
ONCE FigureLength = 100
ONCE LengthExtension = 2
ONCE MinHeight = 20
ONCE MaxHeight = 40
// * Filters
ONCE Breakout = 1
ONCE ValidatedBreakout = 1
ONCE PreviousTrend = 0
ONCE VolumeTrend = 0
ONCE RSIMin = 0
ONCE RSIMax = 100
// * Risk Management
ONCE TargetLevel = 4
ONCE StoplossLevel = 3
// * Display Options (Unuseful for backtest)
ONCE ColourLong = 2
ONCE ColourShort = 1
ONCE FigureThickness = 3
ONCE FontSize = 12
ONCE Light = -25
// * Additional Option -> IMPORTANT!
ONCE StartingYear = 1998//2000
ONCE ReturnData = 1
IF NOT ONMARKET THEN
mySignal, myTargetLong, myStopLossLong, myTargetShort, myStopLossShort, myHeight = CALL "ULTIMATE.BREAKER"[RangeUp, RangeDown, DescendingChannel, AscendingChannel, SymmetricWedgeUp, SymmetricWedgeDown, FallingWedge, RisingWedge, SymmetricBroadeningUp, SymmetricBroadeningDown, FallingBroadening, RisingBroadening, SymmetricTriangleUp, SymmetricTriangleDown, AscendingTriangle, DescendingTriangle, FigureLength, LengthExtension, MinHeight, MaxHeight, Breakout, ValidatedBreakout, PreviousTrend, VolumeTrend, RSIMin, RSIMax, TargetLevel, StoplossLevel, ColourLong, ColourShort, FigureThickness, FontSize, Light, StartingYear, ReturnData, 0](close)
ENDIF
// Conditions pour ouvrir une position acheteuse
IF mySignal= 1 THEN
BUY ROUND(10000/close, 2) CONTRACTS AT MARKET
Set Target Price myTargetLong
Set Stop Price myStopLossLong
ENDIF
// Conditions pour ouvrir une position en vente à découvert
IF NOT ShortOnMarket AND mySignal = -1 THEN
SELLSHORT 1 CONTRACTS AT MARKET
Set Target Price myTargetShort
Set Stop Price myStopLossShort
ENDIF
Example of a long entry
Here is an example of a long entry opening on a symmetric broadening breakup:
![Symmetric Broadening Breakup](https://artificall.com/wp-content/uploads/2024/06/backtest_symmetric_broadening_long_entry.png)
Example of a short entry
Here is an example of a short entry opening on a descending triangle breakdown:
![Descending Triangle Breakdown](https://artificall.com/wp-content/uploads/2024/06/backtest_descending_triangle_short_entry.png)
Backtest setting
The indicator’s parameters are the same as those used with the interface. You will find the same options. Please refer to the “Indicator setting” section for the variable explanations.
Figure selector
Thanks to the figure selector, you can select the figures you want the indicator to recognize. It is composed of two parts: the first contains bullish figures, and the second contains bearish figures.
You must set 1 to activate a figure and 0 to inactivate a figure:
// * Figures Selector
// Long Figures
ONCE RangeUp = 1
ONCE DescendingChannel = 0
ONCE SymmetricWedgeUp = 0
ONCE FallingWedge = 0
ONCE SymmetricBroadeningUp = 1
ONCE FallingBroadening = 0
ONCE SymmetricTriangleUp = 0
ONCE AscendingTriangle = 1
// Short Figures
ONCE RangeDown = 0
ONCE AscendingChannel = 0
ONCE SymmetricWedgeDown = 0
ONCE RisingWedge = 0
ONCE SymmetricBroadeningDown = 0
ONCE RisingBroadening = 0
ONCE SymmetricTriangleDown = 0
ONCE DescendingTriangle = 1
Figure properties
You can set the figure properties. The available parameters are the length, the length extension, the minimal and maximal height:
// * Figure Properties
ONCE FigureLength = 100
ONCE LengthExtension = 2
ONCE MinHeight = 20
ONCE MaxHeight = 40
Filters
You can filter the figures and signals, which can enhance the quality of the buying and selling signals:
// * Filters
ONCE Breakout = 1
ONCE ValidatedBreakout = 1
ONCE PreviousTrend = 0
ONCE VolumeTrend = 0
ONCE RSIMin = 0
ONCE RSIMax = 100
Note: the “Breakout” and “ValidatedBreakout” variables only accept 1 to be activated and 0 to be inactivated.
Risk management
You can define target and stop loss levels:
// * Risk Management
ONCE TargetLevel = 4
ONCE StoplossLevel = 3
Displaying options
The displaying options have no impact on a backtest. You can keep the default values:
// * Display Options (Unuseful for backtest)
ONCE ColourLong = 2
ONCE ColourShort = 1
ONCE FigureThickness = 3
ONCE FontSize = 12
ONCE Light = -25
Additional options
The additional options are critical for the smooth functioning of the trading system. They determine the starting year and the data return:
- The starting year determines the year from which the algorithm will begin to search figures. You must be sure the starting year covers your backtest.
- The data return allows the indicator to send data such as signals, targets, stop losses, and figure heights. You absolutely must set this variable to 1.
// * Additional Option -> IMPORTANT!
ONCE StartingYear = 1998
ONCE ReturnData = 1
The returned variables by the indicator
Here is the description of the six variables returned by the Ultimate Breaker indicator:
Variables | Description |
---|---|
mySignal | Signals of the bullish and bearish figure breakouts: – Bullish breakout: 1 – Bearish breakout: -1 |
myTargetLong | Value of the bullish breakout target |
myStopLossLong | Value of the bullish breakout stop loss |
myTargetShort | Value of the bearish breakout target |
myStopLossShort | Value of the bearish breakout stop loss |
myHeight | Figure height |
Source code example
Example of a long backtest
Here is a code of a backtest calling the Ultimate Breaker indicator, which opens only long entries. In this example, all the bullish figures are activated:
DEFPARAM CUMULATEORDERS = False
// * Figures Selector
// Long Figures
ONCE RangeUp = 1
ONCE DescendingChannel = 1
ONCE SymmetricWedgeUp = 1
ONCE FallingWedge = 1
ONCE SymmetricBroadeningUp = 1
ONCE FallingBroadening = 1
ONCE SymmetricTriangleUp = 1
ONCE AscendingTriangle = 1
// Short Figures
ONCE RangeDown = 0
ONCE AscendingChannel = 0
ONCE SymmetricWedgeDown = 0
ONCE RisingWedge = 0
ONCE SymmetricBroadeningDown = 0
ONCE RisingBroadening = 0
ONCE SymmetricTriangleDown = 0
ONCE DescendingTriangle = 0
// * Figure Properties
ONCE FigureLength = 100
ONCE LengthExtension = 2
ONCE MinHeight = 20
ONCE MaxHeight = 40
// * Filters
ONCE Breakout = 1
ONCE ValidatedBreakout = 1
ONCE PreviousTrend = 1
ONCE VolumeTrend = 0
ONCE RSIMin = 30
ONCE RSIMax = 70
// * Risk Management
ONCE TargetLevel = 7
ONCE StoplossLevel = 5
// * Display Options (Unuseful for backtest)
ONCE ColourLong = 2
ONCE ColourShort = 1
ONCE FigureThickness = 3
ONCE FontSize = 12
ONCE Light = -25
// * Additional Option -> IMPORTANT!
ONCE StartingYear = 1998//2000
ONCE ReturnData = 1
IF NOT ONMARKET THEN
mySignal, myTargetLong, myStopLossLong, myTargetShort, myStopLossShort, myHeight = CALL "ULTIMATE.BREAKER"[RangeUp, RangeDown, DescendingChannel, AscendingChannel, SymmetricWedgeUp, SymmetricWedgeDown, FallingWedge, RisingWedge, SymmetricBroadeningUp, SymmetricBroadeningDown, FallingBroadening, RisingBroadening, SymmetricTriangleUp, SymmetricTriangleDown, AscendingTriangle, DescendingTriangle, FigureLength, LengthExtension, MinHeight, MaxHeight, Breakout, ValidatedBreakout, PreviousTrend, VolumeTrend, RSIMin, RSIMax, TargetLevel, StoplossLevel, ColourLong, ColourShort, FigureThickness, FontSize, Light, StartingYear, ReturnData, 0](close)
ENDIF
// Conditions pour ouvrir une position acheteuse
IF mySignal= 1 THEN
BUY ROUND(10000/close, 2) CONTRACTS AT MARKET
Set Target Price myTargetLong
Set Stop Price myStopLossLong
ENDIF
Long backtest result
Here is the result of the backtest run on the Nasdaq in the 4-hour time unit:
![Ultimate Breaker backtest](https://artificall.com/wp-content/uploads/2024/06/Ultimate_Breaker_long_only_backtest-1024x535.png)
To go further
Automated trading using Prorealtime – Ebook
Building a profitable trader bot step-by-step Congratulations! You have just committed yourself to one of the most challenging exercises today. Algorithmic trading is a fascinating world. Its learning will allow you to push the boundaries of technical analysis and trading. I wrote this book to help you design your trading system using Prorealtime As a…