BBFP EA Settings Guide: Every Input Explained
This page explains all 52 BBFP Breakout Grid EA inputs, using the real XAUUSD M15 defaults from the LOW_DD and HIGH_RISK set files. Each entry includes the effect on the EA and a practical example.
General
| Input | LOW_DD | HIGH_RISK | What it controls | Real-world example |
|---|---|---|---|---|
InpMagicNumber | 20261106 | 20261105 | Unique order identifier. It keeps BBFP positions separate from manual trades and other EAs. | Use a different magic number for every EA on the same account. |
InpBoxTF | 15 Minutes | 15 Minutes | The timeframe used to build session boxes and confirm breakouts. BBFP is designed around M15. | A value of 15 means a signal is evaluated only after an M15 candle closes. |
InpHistoryDays | 45 | 60 | How many days of M15 history the EA loads to build boxes and statistics. | 45 days is enough for the default box lookback; 60 gives more context if your terminal has the data. |
InpManualGMTOffsetHours | 0.0 | 0.0 | Manual broker-server offset from GMT. Zero enables automatic detection. | Keep 0 unless your broker server clock is unusual; the EA rounds the detected offset to 15 minutes. |
InpAllowLong | true | true | Enables BUY breakout setups. | Set false to run a sell-only research test. |
InpAllowShort | true | true | Enables SELL breakout setups. | Set false to run a buy-only research test. |
Session boxes (GMT)
| Input | LOW_DD | HIGH_RISK | What it controls | Real-world example |
|---|---|---|---|---|
InpUseS1 | true | true | Enables the first session box. | S1 is the default 23:00–06:00 GMT range. |
InpS1StartHour | 23 | 23 | S1 start hour in GMT. | 23 means box collection begins at 23:00 GMT. |
InpS1EndHour | 6 | 6 | S1 end hour in GMT; the window wraps midnight. | The S1 box ends at 06:00 GMT and can be traded after that. |
InpUseS2 | false | true | Enables the second session box. | LOW_DD disables S2 because the tested M15 sample showed weaker S2 follow-through. |
InpS2StartHour | 6 | 6 | S2 start hour in GMT. | The S2 box starts at 06:00 GMT. |
InpS2EndHour | 13 | 13 | S2 end hour in GMT. | The S2 box ends at 13:00 GMT. |
Breakout rules
| Input | LOW_DD | HIGH_RISK | What it controls | Real-world example |
|---|---|---|---|---|
InpBreakoutBufferPips | 2.0 | 1.5 | Extra distance the candle must close beyond the box edge. | If box high is 3,950.00 and buffer is 2.0 pips, a buy needs a close above 3,950.20 because 1 gold pip = 0.10. |
InpMaxBarsAfterSession | 8 | 16 | Maximum M15 bars after the session ends in which the first breakout can trigger. | 8 bars = two hours; 16 bars = four hours of opportunity. |
InpMinBoxRangePips | 10.0 | 8.0 | Ignores boxes that are too narrow to offer a real range. | 10 pips = $1.00 on gold; tiny boxes are skipped. |
InpMaxBoxRangeATR | 5.0 | 8.0 | Rejects boxes that are too wide compared with ATR. | ATR 2.00 × 5.0 = $10 maximum box width in LOW_DD. |
InpATRPeriod | 14 | 14 | ATR period used by the box-range and volatility filters. | 14 M15 bars is the standard short-term volatility lookback. |
InpSlBufferPips | 3.0 | 2.0 | Extra stop distance beyond the box edge. | A $0.30 buffer on gold is added below the box low for a buy. |
InpMinStopPips | 10.0 | 8.0 | Minimum stop distance from entry. | The EA widens the stop to at least $1.00 when the box edge is too close. |
InpMaxStopPips | 250.0 | 350.0 | Maximum stop distance in pips. | Prevents a technically valid box from creating an oversized risk unit. |
InpMaxStopATR | 3.0 | 5.0 | Hard stop cap as a multiple of ATR. | ATR 2.00 × 3.0 = $6.00 maximum LOW_DD stop distance. |
Pivot and target rules
| Input | LOW_DD | HIGH_RISK | What it controls | Real-world example |
|---|---|---|---|---|
InpUsePivotBias | true | true | Requires a buy above the previous D1 pivot and a sell below it. | A buy breakout above the box high is skipped if price is still below the previous D1 pivot. |
InpUsePivotTargets | true | true | Prefers a valid pivot level for TP before falling back to the box target. | The EA scans R1, intraday levels and daily targets for a valid RR. |
InpR1Mult | 1.0 | 1.0 | Multiplier for resistance 1 from the pivot formula. | R1 = P + 1.0 × (P − previous-day low). |
InpS1Mult | 1.0 | 1.0 | Multiplier for support 1 from the pivot formula. | S1 = P − 1.0 × (previous-day high − P). |
InpIntraLongMult | 0.236 | 0.236 | Fibonacci multiplier for the intraday long level. | P + 0.236 × previous-day range. |
InpIntraShortMult | 0.236 | 0.236 | Fibonacci multiplier for the intraday short level. | P − 0.236 × previous-day range. |
InpLongTarget1Mult | 0.618 | 0.618 | Multiplier for the first daily long target. | P + 0.618 × previous-day range. |
InpShortTarget1Mult | 0.618 | 0.618 | Multiplier for the first daily short target. | P − 0.618 × previous-day range. |
InpLongTarget2Mult | 1.0 | 1.0 | Multiplier for the second daily long target. | P + 1.0 × previous-day range. |
InpShortTarget2Mult | 1.0 | 1.0 | Multiplier for the second daily short target. | P − 1.0 × previous-day range. |
InpBoxTargetFib | 0.8 | 1.2 | Fallback target as a multiple of the box range. | A $10 box gives an $8 target in LOW_DD or a $12 target in HIGH_RISK. |
InpMinRR | 3.0 | 2.0 | Minimum reward-to-risk accepted. | If the best pivot target is below 3R in LOW_DD, the EA moves TP to 3R. |
InpMaxRR | 5.0 | 8.0 | Maximum reward-to-risk accepted. | Extreme targets are clamped so one setup does not rely on an unrealistic move. |
Controlled grid
| Input | LOW_DD | HIGH_RISK | What it controls | Real-world example |
|---|---|---|---|---|
InpGridEnabled | true | true | Enables additional entries after the initial breakout position. | Disable it for a single-entry research test. |
InpMaxGridLevels | 2 | 4 | Total positions allowed in one basket, including the initial entry. | 2 = initial + one grid entry; 4 = initial + three additions in HIGH_RISK. |
InpGridStepATR | 1.0 | 0.60 | Adverse move required for a grid add, as an ATR multiple. | ATR 2.00 × 1.0 = $2.00 spacing in LOW_DD. |
InpGridMinStepPips | 12.0 | 8.0 | Minimum grid spacing in pips. | Prevents grid entries from clustering in a small range. |
InpGridLotMultiplier | 1.0 | 1.0 | Caps each grid lot relative to the initial lot; 1.0 means no martingale sizing. | Do not raise this just to recover losses. |
InpMaxBasketRiskPercent | 0.75 | 3.0 | Total basket risk at the shared stop. | On $10,000, LOW_DD caps the full grid at $75; HIGH_RISK at $300. |
InpGridOnlyWithBias | true | true | Blocks grid additions if price has crossed to the wrong side of the D1 pivot. | A buy grid stops adding if price falls below the pivot. |
InpGridCooldownBars | 2 | 1 | Minimum M15 bars between grid additions. | Prevents multiple adds from one fast spike. |
Money management
| Input | LOW_DD | HIGH_RISK | What it controls | Real-world example |
|---|---|---|---|---|
InpRiskPercent | 0.25 | 1.0 | Initial risk per trade based on account equity. | $10,000 × 0.25% = $25 LOW_DD risk; 1.0% = $100 HIGH_RISK risk. |
InpMaxDailyLossPercent | 1.0 | 4.0 | Daily equity loss that stops new risk and can close positions. | $10,000 × 1% = $100 LOW_DD daily loss limit. |
InpCloseOnDailyLoss | true | true | Closes all BBFP positions when the daily loss limit is hit. | Set false only if you want to manage exits manually. |
InpMaxSpreadPips | 2.5 | 3.5 | Maximum allowed spread at entry. | LOW_DD blocks entries above $0.25 spread on gold. |
InpSlippagePoints | 30 | 50 | Allowed execution deviation in points. | Gold with three decimals: 30 points = $0.03. |
InpMaxDailyTrades | 1 | 3 | Maximum initial breakout entries per GMT day. | Grid additions are separate and capped by the grid settings. |
Execution and display
| Input | LOW_DD | HIGH_RISK | What it controls | Real-world example |
|---|---|---|---|---|
InpCloseBeforeWeekend | true | true | Closes BBFP positions before the weekend. | Avoids carrying a grid over the weekend gap. |
InpFridayCloseHourGMT | 20 | 20 | Friday close hour in GMT. | Positions are closed from 20:00 GMT on Friday. |
InpShowPanel | true | true | Shows the on-chart status panel. | Displays pivot, boxes, trade count, grid state and daily loss. |
InpVerboseLog | false | false | Prints detailed setup and execution messages. | Enable during testing, disable for normal live use. |
How the risk math works
Initial lot size is calculated from equity, InpRiskPercent, the stop distance and the symbol's tick value loss. LOW_DD risks 0.25% on the first entry; HIGH_RISK risks 1.0%. The grid has a separate ceiling: InpMaxBasketRiskPercent measures all basket positions at the shared stop.
Example: a $10,000 account with LOW_DD uses a $25 initial risk and a maximum $75 basket risk. That does not mean every trade loses those amounts; it means the position sizing is constrained by those limits at the stop. Slippage, gaps and broker execution can produce a different result.
The EA uses the broker's tick value loss when available and checks free margin before sending an order. If the requested lot would exceed the margin buffer, the lot is reduced or skipped.
Settings FAQ
Should I change the defaults?
Start with LOW_DD on demo. Change one group at a time. Increasing risk, grid levels or box range does not automatically improve the strategy.
Why is S2 disabled in LOW_DD?
The M15 data sample used for the presets showed S1 breakouts had better follow-through than S2. HIGH_RISK keeps both sessions for more trades.
Is the grid a martingale?
No. InpGridLotMultiplier defaults to 1.0 and total basket risk is capped. Do not raise the lot multiplier to recover losses.
Download BBFP EALow vs high riskStrategy Tester INI guideInstall guide
Choose the next useful step
Most visitors arrive with one question: build, test, price, or trust. These shortcuts keep the path practical.
Go deeper before you build, download or automate
Hand-picked engineering articles, indicator breakdowns and trading-system tools so visitors keep exploring instead of leaving after one page.
Pine Script to MT4/MT5 Conversion Planner
Analyze Pine strategies, repainting risk, TradingView alert bridges, MTF synchronization and the correct MQL4/MQL5 build path before paying for conversion.
Open planner
3-in-1 MT5 Indicator Bundle
12H Bias Engine, Smart Money Institutional Flow Dashboard and D1/H1 pending-signal logic with MQ5 + EX5 source included via Etsy.
MT5 Bank Orders Institutional Flow Dashboard
Supply/demand zones, BOS/CHoCH, liquidity levels, FVG, equal highs/lows and confirmed trade-plan logic explained with EX5 download.
MT5 Asia London NY Liquidity Engine
Asia range, London raid and New York continuation/reversal planning with internal session backtest stats and entry/SL/TP dashboard.
Interactive Brokers RSI Pair Trader
Tkinter desktop trading workflow, TWS API connection handling, RSI pair logic, risk controls and custom IBKR development positioning.
XAUUSD M30 CSV Data For Backtesting
Use clean MT5 historical data for Python backtests, strategy validation, spread checks and realistic gold EA research workflows.