Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Experts

Simplified "EuroSurge" Expert Advisor - expert for MetaTrader 4

Views:
8032
Rating:
(7)
Published:
2024.10.14 16:36
Updated:
2024.10.17 15:56
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

This code represents a simplified version of "EuroSurge" Expert Advisor (EA) for MetaTrader 4 (MT4). It implements multiple technical indicators for trade signal generation, provides configurable lot sizing, and manages trades based on specific conditions. 

The Default settings work for EURUSD 5min

Settings based off optimizations since 2020

Input Parameters
  1. Trade Size Calculation:

    • The EA allows for three types of trade size calculations:
      • Fixed lot size.
      • Balance percentage (percentage of account balance used to calculate lot size).
      • Equity percentage (percentage of account equity used to calculate lot size).
    • Inputs like FixedLotSize , TradeSizePercent , and MagicNumber configure the lot size and uniquely identify trades.
  2. Indicator Settings:

    • The EA uses a variety of indicators for generating buy and sell signals:
      • Moving Average (MA) with configurable period.
      • Relative Strength Index (RSI) with configurable overbought/oversold levels.
      • MACD with adjustable EMA and signal line settings.
      • Bollinger Bands with adjustable periods and deviation settings.
      • Stochastic Oscillator with configurable %K, %D, and slowing parameters.
    • Each indicator can be toggled on or off using input parameters like UseMA , UseRSI , etc.
Signal Detection
  • IsBuySignal(): This function checks if all buy conditions are met based on the chosen indicators. For example:

    • MA Condition: Checks if the shorter-term MA is above the longer-term MA.
    • RSI Condition: Looks for the RSI being below 50 (relaxed from the oversold level of 30).
    • MACD Condition: Compares the MACD line and signal line.
    • Bollinger Bands Condition: Checks if the price is below the lower band.
    • Stochastic Condition: Looks for %K and %D values below 50 (relaxed from 20).
  • IsSellSignal(): Similar to IsBuySignal() , but reversed for selling conditions, such as checking for:

    • MA Short < MA Long,
    • RSI > 50 (relaxed from overbought at 70),
    • MACD line < signal line,
    • Price above the upper Bollinger band, etc.
Trade Execution
  • When the buy or sell conditions are met, the EA places a trade with calculated stop loss (SL) and take profit (TP) based on multipliers ( SL_Multiplier , TP_Multiplier ).
  • The lot size is calculated using the CalculateLotSize() function, which adjusts based on the selected TradeSizeType .
  • Orders are executed using the OrderSend() function, with error handling to check for issues in placing trades.


The Doji Candelstick Pattern The Doji Candelstick Pattern

The Doji Pattern Detector EA is designed to automatically detect the classic Doji candlestick pattern on any chart. A Doji pattern occurs when the open and close prices of a candle are very close to each other, signaling market indecision. This EA identifies Doji candles where the open and close prices are within a small range and positioned near the midpoint of the candle's high and low.

PrevDayLines.mq4 - Draw Previous Day's High, Low, and Average Price Lines PrevDayLines.mq4 - Draw Previous Day's High, Low, and Average Price Lines

The PrevDayLines.mq4 script is a tool for MetaTrader 4 that automatically draws three critical price levels from the previous trading day on your chart. These levels include the highest price (Max), the lowest price (Min), and the average price (Avg), providing traders with a clear visual reference for key support and resistance points.

Backtesting Trade Assistant Panel Backtesting Trade Assistant Panel

Backtesting Trade Assistant Panel

Candle Size Candle Size

The indicator searches for candles on the price chart that are larger than the size specified in the settings and marks them on the chart.