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

Economic News Window Flag for Pausing Expert Advisors - MetaTrader 5용 expert

Kenichiro Sakamoto
Kenichiro Sakamoto
5 (2)
저는 Kenichiro Sakamoto이며, MetaTrader 5용 투명하고 규칙 기반의 EA(Expert Advisor)를 만드는 스튜디오 FXEA365의 개발자입니다.
조회수:
64
게시됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

This Expert Advisor does not trade. It reads the economic calendar of the terminal every 30 seconds and looks for events of the selected importance for the watched currencies. From a set number of minutes before an event until a set number of minutes after it, the terminal global variable NEWS_PAUSE is set to 1; at other times it is 0.

Any other Expert Advisor in the same terminal can read the flag with GlobalVariableGet and skip new entries while it is 1. The chart comment shows the state of the flag, the active event and the next matching event with the time left until it. A change of the state is also written to the Experts log.

Fig. 1. The utility on a EURUSD H1 chart with the next event shown

Input parameters

  • InpMinImportance - minimum importance of the events: 1 low, 2 moderate, 3 high.
  • InpCurrencies - comma separated list of currencies whose events are watched, for example USD,EUR,GBP,JPY.
  • InpMinutesBefore - the window starts this many minutes before the event time.
  • InpMinutesAfter - the window ends this many minutes after the event time.
  • InpFlagName - name of the terminal global variable that holds the flag.
  • InpLookAheadHrs - number of hours searched for the next event shown on the chart.

Notes

A simple check in another Expert Advisor is: if(GlobalVariableCheck("NEWS_PAUSE") && GlobalVariableGet("NEWS_PAUSE")==1.0) return; placed before the entry code. The flag is reset to 0 when the utility is removed from the chart.

Event names are shown by their calendar code, so the text does not depend on the terminal language. The economic calendar is not available in the Strategy Tester; in the tester the utility only shows a message and keeps the flag at 0.

Trade List Report — a colorful PDF of your trades, written in pure MQL5 Trade List Report — a colorful PDF of your trades, written in pure MQL5

Prints a colorful, print-ready PDF report of your last N trades: KPI cards, a win-rate donut, a zebra table with BUY/SELL pills and diverging profit bars. Pure MQL5 — no DLL, no external converter. Saved to `MQL5\Files`.

Psychological Level Reaction Tracker Psychological Level Reaction Tracker

Free MQL5 indicator that plots 00, 25, 50 and 75 psychological price levels and tracks historical touches, rejections, breakouts and sweeps with dashboard statistics and alerts.

Spread Spike Histogram with Moving Average Spread Spike Histogram with Moving Average

Separate window indicator that draws the spread of every bar as a histogram with its moving average and colors the bars where the spread is far above normal or above a fixed ceiling.

Missing Stop Loss and Take Profit Setter Missing Stop Loss and Take Profit Setter

Utility Expert Advisor that finds open positions without a stop loss or take profit and adds them at a fixed distance in pips from the open price. It never opens or closes trades.