거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Twitter에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
Experts

Forex news events reaction EA: An mql5 calendar introduction. - MetaTrader 5용 expert

조회수:
5064
평가:
(6)
게시됨:
2025.01.21 15:30
FetchNews.mq5 (13.93 KB) 조회
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동
This Expert Advisor (EA) demonstrates how to use the MQL5 Calendar to create an automated trading system that reacts to high-impact forex news events. The main goal of this code is educational: to teach traders and developers how to interact with the MQL5 Calendar to identify and trade around significant economic news releases, such as inflation data (CPI/PPI) or interest rate decisions.
The EA uses the MQL5 Calendar functions to identify upcoming news events relevant to the symbol being traded. If a high-impact event is detected for the base or quote currency, the EA implements a breakout trading strategy by placing pending orders (Buy Stop and Sell Stop) above and below the current price. This approach aims to capture price movements driven by volatility from news releases.  


The EA provides several customizable inputs to adjust its behavior:
  1. Type: The user can select whether the EA should operate in trading mode, or alerts should be sent instead whenever a high impact news event is in the near future.

    • Magic: Specifies the Magic number of the orders, if trading mode is selected.

    • TPPoints: Take Profit points, only relevant if trading mode is selected.

    • SLPoints: Stop Loss points, only relevant if trading mode is selected.

    • Volume: The Volume used for the pending orders, only relevant if trading mode is selected.

    If you'd like to understand the code or the news in general and want to better understand how the calendar is structured in mql5, make sure to watch the youtube video I've made about it: 


    Zigzag fibo oscillator Zigzag fibo oscillator

    An advancement of the MetaQuotes zigzag with an oscillator mode, current bar leg tracking, fib levels, and dynamic scaling

    Checking the server time changes due to the daylight saving time (DST) changeover Checking the server time changes due to the daylight saving time (DST) changeover

    Unfortunately, I discovered that some brokers are a bit sloppy with the server time change due to the daylight saving time (DST), which I did not expect and which surprised me a lot. Here is a script with which anyone can check their broker.

    Candle Range Candle Range

    Candle Range MetaTrader indicator — is a very simple and lightweight indicator that displays the candle's range in pips on mouseover. In addition, to the High/Low range, it can optionally display the body size (Open/Close) for candles. Multiple display parameters are available to control how the indicator looks. This indicator is available for both MT4 and MT5 versions of the trading platform.

    Negative Volume Index indicator Negative Volume Index indicator

    Negative Volume Index (NVI) is a free technical indicator for advanced chart analysis in MT4, MT5 platforms. It is based on tick volume (can be substituted with real volume in MT5) and has two useful features added: Support for multi-timeframe (MTF) operation. Can be switched to show Positive Volume Index.