Logic:
- Arbitrage:
- Utilizes multiple time frames and indicators (ADX, Stochastic, EMA) to identify trade opportunities.
- Places trades based on discrepancies and convergence of signals.
- Trend-Following:
- Uses EMA crossovers and ADX to determine the trade direction.
- Buys if short-term EMA > long-term EMA and ADX > threshold.
- Sells if short-term EMA < long-term EMA and ADX > threshold.
- Order Management:
- Implements dynamic lot sizing based on account balance and risk percentage.
- Limits trades with a specified magical number to manage multiple positions.
- Uses trailing stop to secure profits when the price moves favorably.
- Trailing Stop:
- Adjusts stop loss dynamically to lock in profits as the trade progresses.
- Dynamic Lot Sizing:
- Adjusts the lot size based on account balance and specified risk percentage.
- Calculates lot size using a percentage of account balance and tick value.
- Profit Protection:
- Closes positions when certain candlestick patterns (Evening Star, Morning Star, Bullish/Bearish Engulfing) or Doji candles are detected.
- Uses trailing stop to secure profits.