Logo
Mql5

Writing of an Expert Advisor based on RSI Stock and MACD

Mql5, HI, United States

Save Job

Read the Rules before you post an order or execute it

Writing of an Expert Advisor based on RSI Stock and MACD

HI, I am looking for someone to help create an Expert Advisor (EA) for MetaTrader 5 that evaluates financial market data to place buy or sell trades based on predefined technical analysis criteria applied to closed candle data. It is to be used on any forex pair, metal or crypto.

Buy Signal Criteria

  1. Bullish Momentum: All three conditions must be true -
    1. 9-period EMA > 21-period EMA
    2. 21-period EMA > 55-period EMA
  2. Stochastic Oscillator:
    1. %K main line has crossed above the %D signal line
    2. Both %K and %D have crossed above 20 but not crossed 80
  3. Relative Strength Index (RSI):
    1. RSI > 50
    2. MACD signal line has crossed above the MACD main line

Trade Execution for Buy Signal

  1. Place a buy trade using maximum lots (risking 1% of account balance).
  2. Generate alerts (on-screen pop-up, audio, printed statement).

Exit Conditions for Buy Trade

  1. Take profit achieved at a 1:1.5 risk-to-reward ratio, or
  2. Stochastic %K and %D crossed above 80 with %K below %D.

Sell Signal Criteria

  1. Bearish Momentum: All three conditions must be true -
    1. 9-period EMA < 21-period EMA
    2. 21-period EMA < 55-period EMA
  2. Stochastic Oscillator:
    1. %K main line has crossed below the %D signal line
    2. Both %K and %D have crossed below 80 but not crossed 20
  3. Relative Strength Index (RSI):
    1. RSI < 50
    2. MACD signal line has crossed below the MACD main line

Trade Execution for Sell Signal

  1. Place a sell trade using maximum lots (risking 1% of account balance).
  2. Generate alerts (on-screen pop-up, audio, printed statement).

Exit Conditions for Sell Trade

  1. Take profit achieved at a 1:1.5 risk-to-reward ratio, or
  2. Stochastic %K and %D crossed below 20 with %K above %D.

Additional Requirements

  1. Use data only from completed candles for accuracy.
  2. Alerts must specify which conditions triggered the signal and confirm the criteria.

Steps

  1. Evaluate conditions on Stochastic, RSI, and MACD indicators for buy/sell signals.
  2. Execute trades following the specified risk management strategy.
  3. Implement alerting system for notifications on trade conditions and execution.
  4. Ensure trade execution uses only closed candle data for decision-making.

Output Format

  1. Provide a comprehensive EA script for MetaTrader 5.
  2. Include detailed comments within the code for clarity on implementation.
  3. Ensure flexibility for parameter adjustments in the future.

Examples

  1. No specific examples are provided, but use dynamic testing to validate EA with historical market data.

Notes

  1. The strategy described solely applies to the MetaTrader 5 platform.
  2. Aim for modular code structure to simplify future modifications.
#J-18808-Ljbffr