거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Twitter에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 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 개발자 | 2019년부터 트레이더 | 전략 검증
트레이더로서 로봇은 그 로직만큼만 좋다는 것을 압니다. 귀하의 EA가 전략 의도대로 정확히 작동하도록 합니다.
- 검증된 변환: 전략(Pine Script, Python, NinjaTrader 또는 다른 EA)을 MQL5로 옮기고 두 버전을 거래 단위로 비교합니다.
- 정직한 테스트: 1분 데이터, 실제 스프레드·수수료·스왑, 표본 외 기간.
조회수:
493
게시됨:
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.

Daily Loss Meter for Prop Firm Rules Daily Loss Meter for Prop Firm Rules

Shows on the chart how much of today's prop-firm daily loss limit is used. Counts closed P/L (with commission and swap) and floating P/L since the daily reset, and shows the loss so far, the money left and the equity floor. The base can be balance, equity, or the higher of the two at the reset. Colour warnings at 50% and 80%, with alerts. Display only: never trades.