Skip to main content
Version: 3.0

Example D4: Support and resistance for initial stop loss and initial take profit

caution

This is not a ready-to-use trading strategy. A trading strategy requires adjustment to the timeframe and symbol, along with thorough backtesting. The example is intended as a foundation for your own custom strategy and to help you get familiar with the Expert Advisor Builder web application. To import and use an example, please follow the instructions provided here.

Description

This example uses chart analyzer support and resistance levels for stop loss and take profit placement. The analyzer identifies key price levels automatically, placing stops below support for long trades and targets at resistance levels. Minimum distance requirements ensure levels aren't too close to entry prices.

The 0.00250000 minimum rate of change for stop loss and 0.00300000 for take profit create appropriate spacing from entry prices. These minimums prevent the system from using support or resistance levels that are too close, which could result in premature exits or unrealistic targets.

Chart-based levels often align with psychological price points where many traders place orders. This creates self-fulfilling prophecies as prices react at these levels. Using them for trade management aligns strategies with broader market participant behavior.

Recreate the Example

You can either import this example directly or set it up manually. To manually replicate the trading module, make sure a newly added module includes the following key settings and that the professional mode is activated:

Trade Basics

  • Operation type = Long

Signal Generation - Indicators (MACD Main line)

  • Signal in use = On
  • Signal used for = Entry
  • Selected indicator = MACD
  • Line index = Main line
  • Draw in chart = On
  • Drawing slot = 1

Signal Generation - Indicators (MACD Signal line)

  • Signal in use = On
  • Signal used for = Entry
  • Selected indicator = MACD
  • Line index = Signal line
  • Draw in chart = On
  • Drawing slot = 2

Signal Generation - Indicator Combinations (MACD Main line & MACD Signal line)

  • Signal in use = On
  • Signal used for = Entry
  • Input indicator 1 = MACD (Main line)
  • Input indicator 2 = MACD (Signal line)
  • Value relation = Value x cross value x

Signal Generation - Chart Analyzer

  • Signal in use = On
  • Signal used for = Forward
  • Draw boundaries = Off
  • Draw extrema = Off
  • Draw supports and resistances = On
  • Draw swing phase = Off
  • Supports and resistances forward = ALL
  • Support multiplier = 1.00
  • Resistance multiplier = 1.00

Initial Stop Loss

  • Selection = Support/resistance from chart analyzer
  • Used chart analyzer = Chart Analyzer
  • Minimum value in fix pips = Off
  • Minimum value in rate of change = 0.00250000
  • Maximum value in fix pips = Off
  • Maximum value in rate of change = Off

Initial Take Profit

  • Selection = Support/resistance from chart analyzer
  • Used chart analyzer = Chart Analyzer
  • Minimum value in fix pips = Off
  • Minimum value in rate of change = 0.00300000
  • Maximum value in fix pips = Off
  • Maximum value in rate of change = Off

Screenshots

Example D4: Support/resistance for initial stop loss and initial take profit.webp