Example A1: MACD Long trading
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 demonstrates a fundamental long trading strategy using the MACD (Moving Average Convergence Divergence) indicator. The strategy opens buy positions when the MACD main line crosses above the signal line, indicating potential upward momentum. The Standard Deviation indicator calculates both the initial stop loss, providing dynamic risk management based on market volatility.
The system uses a risk ratio of 1.40 for the take profit level, meaning the potential profit target is 40% larger than the risk taken. This creates a favorable risk-reward balance for long-term profitability. The forward adjustment feature helps position the stop loss at an appropriate distance from the entry price, preventing premature exits during normal market fluctuations.
This configuration works well across different timeframes and currency pairs. Beginners can use this example to understand how technical indicators generate trading signals and how proper risk management protects capital while allowing profits to run.
You can either import this example directly or set it up manually. To manually replicate the trading module, make sure the newly added module includes the following key settings and that the professional mode is activated:
Recreate the Example
You can either import this example directly or set it up manually. To manually replicate the trading module, make sure the newly added module includes the following key settings and that the professional mode is activated:
Trade Basics
- Operation type = Long
Signal Generation - Indicators - STD
- Signal in use = On
- Signal used for = Forward
- Selected indicator = STD
- Draw in chart = Off
- Forward adjustment = 3.50
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 1 cross value 2
Initial Stop Loss
- Selection = Indicator
- Used indicator = STD
Initial Take Profit
- Selection = Risk ratio
- Risk ratio = 1.40
Screenshots
