Simple Trend
Simple Trend
The SimpleTrend is an Expert Advisor (EA) designed for MetaTrader 4, implementing a trend-following strategy that leverages the Average Directional Index (ADX) indicator to identify and capitalize on emerging market trends. The EA initiates trades when the ADX indicator crosses a predefined threshold, signaling a strengthening trend.
Key Features:
Input Parameters:
- stopLoss: Defines the stop loss level in pips.
- trailingStop: Sets the trailing stop level in pips.
- takeProfit: Specifies the take profit level in pips.
- riskPercentage: Determines the risk percentage per trade.
- tradingHourStart and tradingHourEnd: Set the trading hours in 24-hour format.
- useRiskPercentage: If true, the EA calculates the lot size based on the risk percentage; otherwise, a fixed lot size is used.
- fixedLotSize: Specifies the fixed lot size if the useRiskPercentage option is set to false.
Trading Conditions:
- Buy Condition: Executes a buy order when the previous ADX reading crosses below the specified threshold. The EA calculates the entry price, stop loss, and take profit levels, determines the appropriate lot size, and ensures it falls within the allowable range before placing the order.
- Sell Condition: Executes a sell order when the previous ADX reading crosses above the threshold, following the same process as the buy condition.
Order Execution and Error Handling: The EA utilizes the OrderSend function to execute trades, with built-in error handling to manage any issues during order placement.
This EA primarily uses the ADX indicator to make trading decisions, focusing on overbought and oversold market conditions. Users can customize various input parameters to align the EA with their trading strategy. The risk management options include choosing between a fixed or dynamic lot size based on a specified risk percentage.
Please Note: This is an automated EA for using ADX with take profit, stop loss, and trailing stop loss features. It is intended to complement your overall trading strategy. We do not provide settings or backtesting results, which is reflected in the affordable pricing.