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

News Day Blocker - no new trades on US CPI and FOMC days - MetaTrader 5용 expert

Augusto Martin D'anna
Augusto Martin D'anna
MQL5 & Pine Script developer | Trader since 2019 | Strategy validation
As a trader, I know a bot is only as good as the logic behind it. I bridge
trading concepts and clean code: I don't just follow instructions, I make
sure your EA behaves exactly the way your strategy intends.
조회수:
45
게시됨:
cb_newsday.png (79.58 KB)
\MQL5\Experts\
NyTime.mqh (4.3 KB) 조회
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

News Day Blocker stops new trades on US inflation (CPI) release days and Federal Reserve decision (FOMC) days. Days are counted by the New York date and the 2015-2027 calendar is built in, so it behaves the same live and in the Strategy Tester. It never opens trades.

What it does on a news day

  • Closes any position opened that day, manual or from any EA (optional magic number filter).
  • Deletes pending orders (optional).
  • Closes positions still open at a New York time you choose, for example 08:25 before the 08:30 CPI release (optional).
  • Sets the terminal global variable NEWS_DAY_BLOCK to 1 (0 on other days), so your own EAs can read it: if(GlobalVariableGet("NEWS_DAY_BLOCK") == 1) return;
  • Shows the New York time, today's status and the next CPI/FOMC date on the chart.

Files

  • NewsDayBlocker.mq5 - the utility (Experts folder)
  • NyTime.mqh - server time to New York time with US and EU daylight saving, in the same folder

Inputs

  • Broker server clock: New York + 7, Central Europe, Eastern Europe, UTC or automatic (live only)
  • Close positions opened on a news day, delete pending orders, close open positions at a New York time (-1 = off)
  • Magic numbers to watch (empty = all, 0 = manual), status on the chart

Notes

  • Sources: bls.gov and federalreserve.gov. The calendar ends in December 2027; a warning is printed 60 days before. Release dates can change.
  • Tested in the Strategy Tester, September to November 2026: a test position opened every day was closed only on the five CPI/FOMC days.
No Hedge Guard - close the newer side when a buy and a sell are open on one symbol No Hedge Guard - close the newer side when a buy and a sell are open on one symbol

Closes the newer side when a buy and a sell are open on the same symbol (manual trades or any EA). For prop firm accounts that forbid hedging. Never opens trades.

Chart Pattern Breakout Indicator Chart Pattern Breakout Indicator

Breakout status and measured targets for 13 chart patterns: channels, wedges and triangles found on zigzag swings, each shaded by what price did after its last swing (forming, broke up, broke down, target hit, failed) and rated with a quality score. Larger patterns stay around the smaller ones inside them, and same-size patterns never pile up.

NyTime - broker server time to New York time with US and EU daylight saving NyTime - broker server time to New York time with US and EU daylight saving

Converts broker server time to UTC and New York time with US and EU daylight saving rules. Works the same live and in the Strategy Tester, where TimeGMT() returns server time.

MACD Signals MACD Signals

Indicator edition for new platform.