EA_MA_Cross_Dual_EA

Core Trading Logic

Signal Detection

  1. Golden Cross (Upward Breakout)
    • When Fast MA crosses above Slow MA
    • Condition: Fast MA(previous) ≤ Slow MA(previous) AND Fast MA(current) > Slow MA(current)
    • Action: Open BUY 0.01 lot + SELL 0.02 lot simultaneously
  2. Death Cross (Downward Breakout)
    • When Fast MA crosses below Slow MA
    • Condition: Fast MA(previous) ≥ Slow MA(previous) AND Fast MA(current) < Slow MA(current)
    • Action: Open BUY 0.02 lot + SELL 0.01 lot simultaneously

Position Management Strategy

Dual Position Approach:

  • The EA always holds both BUY and SELL positions regardless of market direction
  • Different lot sizes are used based on cross direction to bias the strategy

Profit Taking Logic:

  • BUY positions and SELL positions are managed independently
  • Each position type (BUY/SELL) closes when their combined profit reaches $1
  • Profit calculation includes: OrderProfit + OrderSwap + OrderCommission

Risk Management Features

  1. Duplicate Entry Prevention
    • Uses LastCrossUp and LastCrossDown flags
    • Prevents multiple entries on the same cross signal
    • Flags reset when opposite cross occurs
  2. Magic Number Isolation
    • All orders use the same Magic Number for identification
    • Only manages positions opened by this EA

Strategic Logic

Market Neutral Approach:

  • By holding both BUY and SELL positions, the EA profits from volatility rather than directional moves
  • Different lot sizes create a slight bias toward the expected direction

Scalping Strategy:

  • Small profit target ($1) enables quick profit taking
  • Suitable for ranging or volatile markets
  • Multiple small wins accumulate over time

Hedge-like Behavior:

  • One position may lose while the other gains
  • The winning side closes at $1 profit while the losing side continues
  • This creates a natural hedge against adverse market moves

This logic is designed for markets with frequent MA crosses and sufficient volatility to reach the $1 profit target on either side of the hedge.

XAUUSD TF M15

 


Download EA

Leave a Reply

Your email address will not be published. Required fields are marked *