Skip to main content
Version: 2.0

ITP - Initial Take Profit

Concept diagram

The concept diagram provided below depicts the function block associated with this page.

Concept diagram, Initial Take Profit.png

Initial take profit calculation mode

The Expert Advisor Builder is a tool designed to demystify the complex subject of automated trading. It dissects a trade into its fundamental elements, one of which is the initial take profit level. This level is crucial for closing a trade once a minimum positive trading result has been achieved.

There are generally two prevalent practices in this regard:

  • The first option involves using both a stop loss and a take profit value. This approach equally limits potential losses and profits.
  • The second option involves using only a trailing stop loss, with no take profit value.

The initial take profit is the first profit level established when a trade is initiated. Several methods for determining the initial take profit can be chosen using the input parameter, denoted as > (ITP) Selection. Input parameters configure some of these methods, while others are derived from a signal block. For example, candle patterns often have ideal take profit values derived from the pattern. The table below provides an overview of all the options for setting the initial take profit.

By default, the RISK RATIO option is utilized. This implies that the initial take profit difference is calculated as the product of the initial stop loss difference multiplied by 1.4. This is a widely accepted practice for defining take profit.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (ITP) Selection
(IN_enmItpSelection)
RISK RATIONumeric values usable in SET files:
0 - OFF
1 - FIX PIPS
2 - RATE OF CHANGE
3 - RISK RATIO
4 - MARKET HILO
5 - CHART ANALYZER
6 - CANDLE SEARCH
7 - PATTERN SEARCH
8 - FIBONACCI SEARCH

> (ITP) Selection = OFF

If you prefer your trading module to place orders without any take profit, you can select the OFF option. However, when using this option, it is strongly advised also to configure a stop loss trailing method. With this, a trader may be able to close with profitable results.

The OFF option is depicted in the image below.

Configuration, Initial Take Profit, Initial take profit calculation mode, Selection = OFF.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_citp_2_v_2_0.zip.

> (ITP) Selection = FIX PIPS

If you wish to set a fixed number of pips as the initial take profit, choose the FIX PIPS option and adjust the input parameter > (ITP) Fix pips. This will ensure that every trade is opened with the same take profit difference, measured in pips.

The image below illustrates the FIX PIPS option.

Configuration, Initial Take Profit, Initial take profit calculation mode, Selection = FIX PIPS.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_citp_3_v_2_0.zip.

> (ITP) Selection = RATE OF CHANGE

While a take profit based on a static number of pips may be effective in the short-term, it often becomes less optimal in the long run as market conditions fluctuate. As such, you can also set the initial take profit distance relative to the current price. For instance, when the RATE OF CHANGE (ROC) option is selected, the price when the trade is initiated is 100% (for example, 10000 USD). If 0.004 is configured for the input parameter > (ITP) Rate of change (min value), the actual take profit difference is calculated as 0.004 ROC * 10000 USD = 40 USD. As the price varies, the initial take profit difference adjusts accordingly. This approach is particularly beneficial for asset prices that increase over time, such as indices.

The image below illustrates the ROC option.

Configuration, Initial Take Profit, Initial take profit calculation mode, Selection = RATE OF CHANGE.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_citp_4_v_2_0.zip.

> (ITP) Selection = RISK RATIO

A common approach to calculate the initial take profit level is to set it in relation to the initial stop loss difference. By definition, the stop loss limits potential losses, while the take profit limits potential profits. This implies that the take profit distance should be larger than the stop loss distance to ensure long-term profitability. Therefore, a widely accepted method is multiplying the initial stop loss difference value by a certain multiple to calculate an appropriate initial take profit. This assumption excludes stop loss trailing. Due to the dynamic risk ratio in place when trailing is active, the initial take profit may be allowed to be smaller than the initial stop loss distance.

The RISK RATIO option utilizes this practice. While another function block configures the initial stop loss, the actual stop loss is multiplied by the input parameter > (ITP) Risk ratio. The risk ratio varies depending on the trading style. Generally, the smaller the trading timeframe, the smaller the risk ratio is acceptable.

The image below illustrates the RISK RATIO option.

Configuration, Initial Take Profit, Initial take profit calculation mode, Selection = RISK RATIO.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_citp_5_v_2_0.zip.

> (ITP) Selection = MARKET HILO

The MARKET HILO algorithm searches for reasonable previous highs (long trades) or lows (short trades) depending on the trade direction and uses these values as the initial take profit. Various input parameters allow you to adjust this algorithm. For a detailed explanation, please refer to the relevant section. This algorithm generally enables the search for previous support and resistance levels to be used as an initial take profit. The algorithm for identifying support and resistance levels is lightweight and does not require a chart analyzer module.

The MARKET HILO option is illustrated in the image below.

Configuration, Initial Take Profit, Initial take profit calculation mode, Selection = MARKET HILO.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_citp_6_v_2_0.zip.

> (ITP) Selection = CHART ANALYZER

Specific trading signals come with take profit recommendations, including those from the CHART ANALYZER. The chart analyzer engine is a robust tool for identifying resistance levels and can derive initial take profit values from these. At least one chart analyzer must be enabled as a data source to utilize this option. The example below shows a trade with its initial take profit level set precisely at a previous resistance. For information on adjusting the selection process, please refer to the configuration section for the chart analyzer. If multiple submodules of the chart analyzer are enabled, the sum of all found support and resistance levels is used for the initial take profit selection.

Configuration, Initial Take Profit, Initial take profit calculation mode, Selection = CHART ANALYZER.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_citp_7_v_2_0.zip.

> (ITP) Selection = CANDLE SEARCH

Many, but not all, typical candle patterns also provide initial take profit recommendations. If signals are generated with the candle search engine, these can be used by selecting the CANDLE SEARCH option. This requires enabling the candle search and the candle pattern to have an ideal take profit. The RATE OF CHANGE value is a backup if no ideal take profit value is provided. For a complete understanding of this option, please refer to the input configurations for the candle search engine.

The CANDLE SEARCH option is illustrated in the image below.

Configuration, Initial Take Profit, Initial take profit calculation mode, Selection = CANDLE SEARCH.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_citp_8_v_2_0.zip.

> (ITP) Selection = PATTERN SEARCH

Some pattern search patterns also define ideal take profits. If so, you can use them as the initial take profit by selecting the PATTERN SEARCH option. The pattern search engine must be the primary trade signal source. The RATE OF CHANGE value is a backup if no ideal take profit value is provided. Refer to this user manual section for information on configuring this functional block.

The PATTERN SEARCH option is illustrated in the image below.

Configuration, Initial Take Profit, Initial take profit calculation mode, Selection = PATTERN SEARCH.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_citp_9_v_2_0.zip.

> (ITP) Selection = FIBONACCI SEARCH

In many cases, the retracement level of a Fibonacci pattern is a good option for ideal take profit levels. You can use one of these directly by selecting FIBONACCI SEARCH as the source of the initial take profit. The RATE OF CHANGE value is a backup if no ideal take profit value is provided. Please refer to the related documentation to learn how to set the take profit to different retracement levels.

The FIBONACCI SEARCH option is illustrated in the image below.

Configuration, Initial Take Profit, Initial take profit calculation mode, Selection = FIBONACCI SEARCH.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_citp_10_v_2_0.zip.

Parameters for fix pips based initial take profit

In the table below, you can find all input parameters used to adjust the FIX PIPS option.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (ITP) Fix pips
(IN_nItpFixPips)
300The input value cannot be smaller or equal to 0.
The input parameter is only used when FIX PIPS is selected for > (ITP) Selection.

Using a fixed amount of pips is the most straightforward concept defining the initial take profit value. Nevertheless, the following four chart examples demonstrate how the initial take profit value is placed further away as the > (ITP) Fix pips input parameter is larger.

Configuration, Initial Take Profit, Parameters for fix pips based initial take profit, Example charts.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_citp_11_v_2_0.zip.

Parameters for risk ratio based initial take profit

In the table below, you can find all input parameters used to adjust the RISK RATIO option.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (ITP) Risk ratio
(IN_dItpRiskRatio)
1.4The input value cannot be smaller or equal to 0.
The input parameter is only used when RISK RATIO is selected for > (ISL) Selection.

As previously explained, the RISK RATIO option employs a multiplier to determine the initial take profit based on the initial stop loss difference. The image below illustrates this widely used practice with different risk ratios. As can be observed, the initial stop loss is directly proportional to the initial take profit. If the initial stop loss changes, the initial take profit would adjust correspondingly.

Configuration, Initial Take Profit, Parameters for risk ration based initial take profit, Example charts.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_citp_12_v_2_0.zip.

Parameters for rate of change based initial take profit

The table below shows all input parameters used to adjust the RATE OF CHANGE option.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (ITP) Rate of change (min value)
(IN_dItpRateOfChange)
0.0004The input value cannot be smaller or equal to 0.
The input parameter is used when RATE OF CHANGE is selected for > (ITP) Selection or as backup value in case the initial take profit is too close to the actual price.

As mentioned, the RATE OF CHANGE option allows you to define the initial take profit difference as a relative value, using the price as a reference at the opening. When RATE OF CHANGE (ROC) is selected, the opening price represents 100%, for example, 10.000 USD. If 0.004 is configured for the input parameter > (ITP) Rate of change (min value), the actual take profit difference is calculated by 0.004 ROC 10.000 USD = 40 USD. As the price changes, the initial take profit difference adapts accordingly. This is particularly useful for assets with rising prices over time, such as indices. For example, if the indices price grows to 11.000 USD, the initial take profit difference will become 0.004 ROC 11.000 USD = 44 USD.

In addition to its relative nature, this parameter is the minimum initial take profit value for the entire ITP module. For instance, when using the ATRS option, the initial take profit may be too close to the current price. If the initial take profit distance is smaller than the rate of change defined value, the rate of change value is used instead. This means the input parameter > (ITP) Rate of change (min value) is actively used for calculations regardless of whether the RATE OF CHANGE option is used as the initial take profit calculation method.

As demonstrated in the series of examples below, the larger the rate of change value is configured, the larger the initial take profit difference becomes.

Configuration, Initial Take Profit, Parameters for rate of change based initial take profit, Example charts.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_citp_13_v_2_0.zip.

Parameters for HiLo based initial take profit

The table below lists all the input parameters used to adjust the MARKET HILO option.

Input variable within MetaTrader
(Identifier in SET file)
Default valueComment
> (ITP) Market HiLo range
(IN_nItpMarketHiLoRange)
100The input value cannot be smaller or equal to 0.
The input parameter is only used when MARKET HILO is selected for > (ITP) Selection.
> (ITP) Market HiLo min
(IN_dItpMarketHiLoMin)
0.2The input value has to be between 0 and 1.
The input parameter is only used when MARKET HILO is selected for > (ITP) Selection.
> (ITP) Market HiLo max
(IN_dItpMarketHiLoMax)
1.0The input value has to be between 0 and 1.
The input parameter is only used when MARKET HILO is selected for > (ITP) Selection.
> (ITP) Market HiLo prominence
(IN_dItpMarketHiLoProminence)
0.025The input value has to be between 0 and 1.
The input parameter is only used when MARKET HILO is selected for > (ITP) Selection.
> (ITP) Market HiLo correction
(IN_dItpMarketHiLoCorrection)
1.0The input value cannot be smaller or equal to 0.
The input parameter is only used when MARKET HILO is selected for > (ITP) Selection.

Various input parameters can be used to adjust the MARKET HILO algorithm, each illustrated in the functional diagram below.

Configuration, Initial Take Profit, Parameters for HiLo based initial take profit, Function principle.png

The input parameters serve the following purposes:

  • > (ITP) Market HiLo range: This defines the bars within which a high or low can be searched.
  • > (ITP) Market HiLo min: This sets the minimum prominence a high or low must have to be valid as the value for the initial stop loss. The input is allowed to be between 0 and 1, representing 0% or 100% of the Market HiLo reference. The Market HiLo reference is the difference between the current price and the lowest price (for long trades) or the highest price (for short trades) within the range defined by the Market HiLo range.
  • > (ITP) Market HiLo max: This sets the maximum distance the local low or local high can be from the opening price. The Market HiLo reference is also used for these parameters as a reference. The parameter can be between 0 and 1, representing 0% or 100%.
  • > (ITP) Market HiLo prominence: The prominence parameter defines the minimum significance required between local lows and local highs to qualify for a valid low or high detection. Similar to the min and max values, it can range between 0 and 1, representing 0% or 100% of the Market HiLo reference.
  • > (ITP) Market HiLo correction: This value can be used to fine-tune the final selected initial stop loss value. If the value is smaller than one, the initial stop loss moves closer to the current price. If the value is greater, the stop loss moves away from the current price.

Please refer to the examples below, which demonstrate some setups for the Market HiLo initial take profit selection.

Configuration, Initial Take Profit, Parameters for HiLo based initial take profit, Example charts.png
tip

To reproduce the chart from above, you can download and use the SET file package um_eab_citp_15_v_2_0.zip.