DODF (Daily Open Direction Filter) - User Guide
OverviewThe Daily Open Direction Filter (DODF) is a systematic approach that defines directional trading zones based on the price's position relative to the daily opening level. When the price trades above the daily open, only bullish signals are allowed. Conversely, when the price trades below the daily open, only bearish signals are permitted. This filtering mechanism helps traders maintain alignment with prevailing intraday momentum and reduces counter-trend signal noise.
Core Logic & Formulas
Variable Definitions:- O_D1 = Daily open price: iOpen(Symbol(), PERIOD_D1, 0)
- P = Reference price from selected timeframe: iClose(Symbol(), RefTF, 0)
Trading Zones:
- Bullish Zone: P > O_D1 (Price is above the daily open → only buy signals allowed)
- Bearish Zone: P < O_D1 (Price is below the daily open → only sell signals allowed)
- Neutral Zone: P ≈ O_D1 (Price is within an epsilon buffer → no signals allowed)
Input Parameters
UseDODF = true
Purpose: Master switch to enable or disable the DODF filtering system.
- true - DODF filtering is active; signals are filtered based on the daily open bias.
- false - DODF filtering is disabled; all signals pass through unfiltered.
RefTF = PERIOD_M15
Purpose: Reference timeframe for price comparison against the daily open.
- Common values: PERIOD_M1, PERIOD_M5, PERIOD_M15, PERIOD_M30, PERIOD_H1
- The system uses the close price from this timeframe to determine the current market position.
- Lower timeframes offer more responsive filtering, while higher timeframes offer smoother filtering.
EpsilonPoints = 3
Purpose: Neutral zone buffer around the daily open price (in points).
- Defines a "dead zone" where neither bullish nor bearish bias is active.
- Prevents excessive signal switching when price hovers near the daily open.
- Example: If the daily open is 1.2000 and EpsilonPoints = 3, the neutral zone is from 1.1997 to 1.2003.
ShowBiasBadge = true
Purpose: Display a visual bias indicator on the chart.
- true - Shows the current DODF status as a text label on the chart.
- false - Hides the bias badge (DODF still functions in the background).
Bias Badge States
"DODF: BUY ONLY" (Aqua)
- Condition: Reference price > Daily Open + Epsilon
- Meaning: Market is trading above the daily open with sufficient margin.
- Effect: Only bullish signals are allowed, and bearish signals are filtered out.
- Trading Implication: Align with upward intraday momentum.
"DODF: SELL ONLY" (Yellow)
- Condition: Reference price < Daily Open - Epsilon
- Meaning: Market is trading below the daily open with sufficient margin.
- Effect: Only bearish signals are allowed, and bullish signals are filtered out.
- Trading Implication: Align with downward intraday momentum.
"DODF: NEUTRAL" (Light Slate Gray)
- Condition: Reference price within the Daily Open ± Epsilon range.
- Meaning: Market is trading near the daily open, with no clear directional bias.
- Effect: All signals are filtered out (neither buy nor sell allowed).
- Trading Implication: Wait for a clear directional breakout.
"DODF: OFF" (Gray)
- Condition: UseDODF = false
- Meaning: DODF system is disabled.
- Effect: All original signals pass through without filtering.
Visual Indicators
Daily Open Horizontal Line
- Appearance: Dotted gray line extending from 00:00 to the current bar time.
- Purpose: Visual reference for the daily opening price level.
- Behavior: Automatically updates and repositions with each new trading day.
EA State Indicators
When MAKE_EA_BUFFERS_VISIBLE = true, two additional arrow indicators appear:
EA Buy State (Lime Arrows - Symbol 108)
- Shows confirmed bullish signals that passed DODF filtering.
- Appears only when the original indicator generates a buy signal, and DODF allows a bullish bias.
- Positioned at the exact price level of the original signal.
EA Sell State (Yellow Arrows - Symbol 108)
- Shows confirmed bearish signals that passed DODF filtering.
- Appears only when the original indicator generates a sell signal, and DODF allows a bearish bias.
- Positioned at the exact price level of the original signal.
These EA state arrows represent the final filtered signals available to automated trading systems, providing clear visual confirmation of which original signals survive the DODF filtering process.
Usage Strategy
- Monitor the bias badge to understand the current market directional preference.
- Use the daily open line as a key reference level for intraday trading decisions.
- Focus on signals that align with the active DODF zone (buy-only or sell-only).
- Avoid trading during neutral periods when the price lacks clear directional commitment.
- Adjust epsilon settings based on market volatility and instrument characteristics.
//--------------------------------------------------
//Paid Version - NRP Bias: D1 | DODF (Daily Open Direction Filter)_03 - Click HERE
NRP Bias: D1 | DODF (Daily Open Direction Filter)_03 - A paid test version is now available (14-day or 30-day). - A paid lifetime version is also available. Contact: - Telegram: @MwlRCT - ForexFactory: Private Message (PM)
Download:
//--------------------------------------------------
//DODF (Daily Open Direction Filter)_03 |
//--------------------------------------------------
/*-------------------------------------------------------------------- Change-log: DODF (Daily Open Direction Filter)_03 Updated:[19-September-2025] By: MwlRCT -------------------------------------------------------------------- - NY Close anchor uses g_dodfSessionStartTime only. - Removed D1 midnight fallback in UpdateOpenHL(). - Added guard: no draw if session start invalid. - Implemented multi-TF open lookup: H1→M15→M5→M1. - D1 used as price last resort only (not time). - Exact anchor match; line rebuilt on mismatch. - Preserved Broker Midnight mode behavior. - Kept non-repainting behavior intact. - Minor comments and structure cleanup. --------------------------------------------------------------------*/
//----------------------------------------------------------
OLD VERSION
Download: DODF (Daily Open Direction Filter)_02
README v02 click here
/*-------------------------------------------------------------------- Change-log: DODF (Daily Open Direction Filter)_02 Updated:[18-September-2025] By: MwlRCT -------------------------------------------------------------------- - feat: Added a user-selectable 'DODF_AnchorMode' input. - feat: Implemented a new DST-aware "NY Close 17:00 ET" anchor. - feat: Default behavior is now the timezone-independent NY Close anchor. - fix: DODF daily open is now consistent and reproducible on all brokers. - refactor: Replaced server-time logic with a robust UTC-based system. - chore: Kept the original "Broker Midnight" logic as a selectable option. --------------------------------------------------------------------*/
---
/*-------------------------------------------------------------------- Change-log: DODF (Daily Open Direction Filter)_01 Updated: [September 15, 2025] By: MwlRCT -------------------------------------------------------------------- - Added user-configurable inputs for daily open line visuals - Implemented bias-based coloring for daily open line - Added customizable style and width options for daily open line - Line color now dynamically reflects DODF bias state (Buy/Sell/Neutral) - Visual properties update immediately without reattaching indicator - Maintained backward compatibility with default visual values - Unify EA_READY Semantics to Directional (+1/-1) - Implement Badge Lifecycle Symmetry - Added new extern parameter DODFstateSize (1-5) to control State arrow size - Added DODF_Session_Start parameter (0-23) for custom session hour anchoring - Updated UpdateOpenHL() to anchor horizontal line at custom session start time - Implemented rollover handling for session transitions - Added 3600-second tolerance for timestamp comparison in line rollover detection --------------------------------------------------------------------*/
---
DislikedHELLO MY DEAR FRIEND THIS IS MY STRATEGY I LIKE YOU HELP ME AND MAKE IT ONE EA PLEASE THANK YOU ..... If the price is above the opening point of the daily candle, we are looking to buy only, and if the price is below the opening point of the daily candle, we are looking to sell only under easy conditions and rules that I will mention to you.Ignored