Trading Signals
Trading signals define when your Expert Advisor should open or close positions. Learn how to create powerful entry and exit conditions.
What Are Trading Signals?
Signals are conditional rules that trigger trading actions. They compare values (indicator outputs, price, account metrics) using comparison operators.
Signal Types
Open Buy Signals
Conditions that trigger opening a buy (long) position. Example: "Open buy when RSI crosses above 30"
Open Sell Signals
Conditions that trigger opening a sell (short) position. Example: "Open sell when RSI crosses below 70"
Close Buy Signals
Conditions that trigger closing existing buy positions. Example: "Close buy when profit exceeds 50 pips"
Close Sell Signals
Conditions that trigger closing existing sell positions.
Building a Signal
A signal consists of three parts:
- Left Value: What to compare (indicator output, price, etc.)
- Operator: How to compare (greater than, less than, equal, etc.)
- Right Value: What to compare against (another indicator, constant, price, etc.)
Example Signal
RSI.Value > 30
- Left Value: RSI indicator output
- Operator: Greater than (>)
- Right Value: Constant (30)
Value Types
Indicator Values
Reference any output from your configured indicators. Each indicator may have multiple outputs (e.g., MACD has Main, Signal, and Histogram).
Price Values
Current market prices:
- Open, High, Low, Close
- Bid, Ask
Account Values
Account metrics:
- Balance
- Equity
- Profit
Order Values
Position information:
- Open Positions Count
- Current Position Profit
Constant Values
Fixed numbers for comparison (e.g., 30, 70, 1.5, etc.)
Comparison Operators
- > Greater than
- >= Greater than or equal
- < Less than
- <= Less than or equal
- == Equal
- != Not equal
Signal Evaluation Strategies
When you have multiple signals, choose how they should be evaluated:
All Signals (AND)
All signals must be true for the action to trigger. Use this for strict entry conditions.
Any Signal (OR)
At least one signal must be true. Use this for flexible entry with multiple strategies.
At Least N Signals
A minimum number of signals must be true. Good for confirmation strategies.
Example Strategies
RSI Oversold/Overbought
Open Buy: RSI < 30
Close Buy: RSI > 70
Moving Average Crossover
Open Buy: MA_Fast > MA_Slow
Open Sell: MA_Fast < MA_Slow
Multi-Indicator Confirmation
Open Buy (All signals):
- RSI > 50
- MACD.Main > MACD.Signal
- Close > MA_20