Entry Strategy:
When the latest candlestick opens, perform the following:
-
If both K% and D% lines closed below 30 on the previous candlestick and K% crosses above D% (golden cross), place a 1-lot BUY order at the current price.
-
If both K% and D% lines closed above 70 on the previous candlestick and K% crosses below D% (death cross), place a 1-lot SELL order at the current price.
(The values 30 and 70 are parameters that can be modified in the EA's parameter window.) Additional Orders: This EA places at most one order per candlestick. No new orders will be placed if the previous order is still open.
Exit Strategy:
-
When an order is placed, the EA sets a 200-point stop loss and a 500-point take profit. The order will automatically close when the price hits the stop loss or take profit. (Stop loss and take profit points can be modified in the EA's parameter window.)
-
If the opposite entry condition is met, the current order is closed at the market price.
-
[Trailing Stop] (See details below).
-
[Break-Even] (See details below).
Terminology
Order Magic Number: When multiple order-placing EAs are loaded for the same symbol, each EA must have a unique number in its "Order Magic Number" parameter to distinguish its orders. This prevents logical errors by allowing EAs to identify and manage their respective orders.
Points: 1 point corresponds to the last decimal place of the symbol’s price. For a 5-decimal price, 1 point is 0.00001; for a 4-decimal price, 1 point is 0.0001.
Trailing Stop:
-
Parameters: Parameter A [Profit Points to Start], Parameter B [Retracement Points to Close]
-
Function: When an order’s profit reaches or exceeds the points specified in Parameter A, this function continuously monitors the distance between the stop loss price and the current price. If the distance exceeds the points specified in Parameter B, the stop loss is automatically adjusted to the current price minus the points specified in Parameter B.
-
Example: Parameter A = 100, Parameter B = 50. For a BUY order opened at 1.00001, if the price rises to 1.00101 (a profit of 100 points, meeting Parameter A), the stop loss is moved to 1.00051 (current price minus 50 points, Parameter B). If the price rises further to 1.00111, the stop loss adjusts to 1.00061.
-
Note: For BUY orders, the stop loss is only adjusted upward; for SELL orders, it is only adjusted downward.
-
Disable: Set Parameter B [Retracement Points to Close] to 0 to disable this function.
-
Requirement: Parameter B must exceed the MT4 platform’s minimum required distance between the current price and stop loss, or the setting will fail.
-
Manual Adjustment of Retracement Distance: If enabled, after an order meets the trailing stop condition and the user manually adjusts the stop loss, the EA records the new stop loss distance and uses it for further trailing stop adjustments. If this option is enabled, this instruction should be placed before the order-placing module to clear stored order status information when no orders are open.
-
Partial Closure: In MT4, if an order is partially closed, the remaining portion is treated as a new order by this EA.
Break-Even:
-
Parameters: Parameter A [Profit Points to Trigger], Parameter B [Profit Points to Lock]
-
Function: When an order’s profit reaches or exceeds the points specified in Parameter A, the stop loss is set to lock in the profit specified in Parameter B. (Parameter B must be less than Parameter A.)
-
Example: Parameter A = 100, Parameter B = 5. For a BUY order opened at 1.00001, if the price rises to 1.00101 (a profit of 100 points, meeting Parameter A), the stop loss is moved to 1.00006 (entry price plus 5 points, Parameter B) to lock in at least 5 points of profit.
-
Note: For BUY orders, the stop loss is only adjusted upward; for SELL orders, it is only adjusted downward.
-
Disable: Set Parameter A [Profit Points to Trigger] to 0 to disable this function.
-
Requirement: Parameter A must be greater than Parameter B, and the difference must exceed the MT4 platform’s minimum required distance between the current price and stop loss, or the setting will fail.
-
One-Time Break-Even: If enabled, this instruction applies the break-even stop loss adjustment to an order only once. If this option is enabled, this instruction should be placed before the order-placing module to clear stored order status information when no orders are open.
-
Partial Closure: In MT4, if an order is partially closed, the remaining portion is treated as a new order by this EA.
Cross Above (Cross Below):
-
Parameters: Parameter B [Indicator 1], Parameter C [Indicator 2]
-
Cross Above Logic: The logic is satisfied when [Indicator 1] is greater than [Indicator 2] on the current candlestick, and [Indicator 1] was less than or equal to [Indicator 2] on the previous candlestick.
-
Cross Below Logic: The logic is satisfied when [Indicator 1] is less than [Indicator 2] on the current candlestick, and [Indicator 1] was greater than or equal to [Indicator 2] on the previous candlestick.
Market Price Entry: BUY orders are placed at the ASK price, and SELL orders are placed at the BID price.