CandleDirectionEA
- Experts
- Versione: 1.0
Overview
This Expert Advisor evaluates the previous closed bar when a new bar opens and places a Buy order when the close is above the open plus the doji buffer, or a Sell order when the close is below the open minus the doji buffer. If the price difference stays within the doji buffer zone, no trade is opened.
Inputs and Behavior
Lot size sets the requested order volume, normalized and bounded to the symbol volume limits and step size.
Stop Loss (points) and Take Profit (points) define optional point distances from the entry price, adjusted for symbol stop and freeze levels when enabled.
Doji buffer zone (points) sets the neutral price band around the candle open where no order is placed.
Maximum open positions limits how many open positions on the current symbol and magic number this Expert Advisor can hold at the same time.
Magic number identifies positions and orders belonging to this Expert Advisor without counting positions from other strategies.
Trading and Stability Controls
The Expert Advisor checks terminal, Expert Advisor, account, and symbol trading permissions, validates market prices and historical bar data, verifies free margin before sending orders, and logs trade server return codes with rate limiting. It does not use external libraries, external licenses, account locks, or broker restrictions.
Risk Notice
Trading leveraged instruments involves substantial risk of loss and may not be suitable for all traders. Test thoroughly on a demo account before using live funds.
