On this page
Potential levels, a distance panel and optional zones
Support and Resistance Lines groups native Fractal prices into ATR-sized price intervals and draws horizontal averages. Above the current price a line is resistance; below it, support. Optional shaded zones and a panel show proximity. These are calculated references, not guaranteed barriers or orders protected by stops.
ForexBestRobots 1.04 is a marked Apache 2.0 derivative of EarnForex 1.03. It fixes bounded history and MT5 ignored-window copies, handle lifecycle, distance ties and missing-level states. It also aligns near/far thresholds, limits cleanup to its own objects and uses neutral panel labels. The 30 functional controls and different platform scan defaults remain; the default instance name is ForexBestRobots-SR.
Fractals, ATR100 bins and arithmetic means
ATRPeriod=100 is fixed in source. At a rebuild, step is ATR(100) on source candle 0 multiplied by SRAccuracy: HIGH=1, MEDIUM=2, LOW=3, rounded to symbol digits. Smaller intervals can separate observations more finely; these labels do not grade trading accuracy. Fractals need following candles, so recent candidates can change while a right-hand candle is forming.
The chosen source window supplies its lowest Low and highest High. Inclusive intervals run upward from that lowest price in steps. A nonempty interval produces the arithmetic mean of its Fractal prices, rounded to symbol digits—not a median. If both Fractal sides exist on one candle, the upper value takes precedence. An observation exactly on a shared interval edge can count in both intervals. Line width is the observation count capped at 5, not a measured bounce probability.
MT4 defaults to MaxBars=500; MT5 to MaxBarsExt=100. BarsToIgnore shifts the whole analysed window in this edition; ATR still uses source candle 0. MaxRange=0 removes the price-range filter. A positive value is the total width around live price, and only whole intervals inside ±MaxRange/2 points survive. Levels rebuild on a new chart/source bar or history reset, while distances update with live price. They can move; extending a current horizontal line backwards does not make it a historical signal.
30 functional inputs, plus six decorative headings
Both platforms expose 30 controls and six Comment separators. The scan name/default differs as shown below. Distances use platform points, not automatically pips: with five-digit EUR/USD, 50 points=0.00050=5 pips. In this edition, near means integer distance ≤SafeDistance, far means >SafeDistance. Missing levels never qualify as far.
| Input | Default | Practical meaning |
|---|---|---|
SRTimeframe | PERIOD_CURRENT | Source timeframe; PERIOD_CURRENT follows the chart. A different timeframe needs its own loaded history; native MTF operation is untested. |
SRAccuracy | MEDIUM | ATR-bin multiplier: HIGH=1, MEDIUM=2, LOW=3. Finer/coarser intervals, not guaranteed signal quality. |
SafeDistance | 50 | Proximity threshold in symbol points; 50 is not universally 50 pips. |
FillBuffersWith | LEVELS | Eight current-only EA buffers: LEVELS contains prices; DISTANCES contains a far flag, nearest prices and point distances. |
BarsToIgnore | 0 | Skip this many recent source-window candles. The window shifts consistently; source ATR0 remains live. |
MaxBars / MaxBarsExt | MT4: 500 / MT5: 100 | Positive scan length: MT4 500 versus MT5 100. Available history can shorten it; extreme grid/work requests are refused. |
MaxRange | 0 | Total price-filter width in points, centred on live price; 0 disables it. Only fully contained bins are retained. |
WhenNotify | DANGER | DANGER requests near-level notifications; SAFETY requests far-distance notifications. The labels do not imply trading safety. |
EnableNotify | false | Master switch, false; required for notification attempts and optional alert arrows. |
SendAlert | true | Popup channel, true, but inactive while the master is false. |
SendApp | false | Push channel, false; requires master plus terminal configuration. |
SendEmail | false | Email channel, false; requires master plus terminal configuration. |
SendSound | false | Sound channel, false; for sound-only enable master/sound and disable SendAlert. |
SoundFile | alert.wav | Terminal sound filename, alert.wav by default; used only when sound and master are enabled. |
DrawLinesEnabled | true | Draw horizontal lines, true; shaded zones also require this switch. |
ResistanceColor | clrGreen | Resistance-line colour, green by default; identifies a line above current price, not a buy instruction. |
SupportColor | clrRed | Support-line colour, red by default; not a sell instruction. |
DrawZones | false | Draw zones, false; when enabled with lines, each extends SafeDistance points above and below its level. |
ZoneResistanceColor | clrMediumSeaGreen | Colour of resistance zones; does not alter levels or distance calculations. |
ZoneSupportColor | clrLightSalmon | Colour of support zones; purely graphical. |
DrawWindowEnabled | true | Show the panel, true. The edition displays NEAR LEVEL, FAR FROM LEVEL or NO LEVEL FOUND. |
PanelCorner | CORNER_LEFT_UPPER | Panel anchor, upper-left by default; four chart corners are available. |
Xoff | 20 | Nonnegative horizontal panel offset in pixels; default 20. |
Yoff | 20 | Nonnegative vertical panel offset in pixels; default 20. |
DrawArrowEnabled | false | Optional alert-condition markers, false; master required even when delivery channels are off. At most one per chart bar. |
ArrowDangerResistanceColor | clrRed | Down-marker colour near resistance, red; proximity is not a short-entry rule. |
ArrowDangerSupportColor | clrGreen | Up-marker colour near support, green; proximity is not a long-entry rule. |
ArrowSafeColor | clrDodgerBlue | Far-distance diamond colour, DodgerBlue; not a directional signal. |
ArrowSize | 2 | Marker size, default 2; supported values 1–5. |
IndicatorName | ForexBestRobots-SR | Unique instance name and owned-object prefix; ForexBestRobots-SR, 1–30 characters. Use a different name for each chart copy. |
Real EUR/USD: levels as of a specified snapshot
These original charts use archived Yahoo Finance EURUSD=X H1 OHLC in UTC. Our independent illustration uses strict five-bar extrema and a rolling-simple ATR100 model. Native Fractal plateau/tie rules, initialization and broker history can differ. Each set of lines is calculated at the final displayed candle; it was not known across the preceding chart. These are snapshots, not terminal screenshots, tick replays or executed trades.



Quote-provider OHLC are not identified broker-specific Bid/Ask execution prices. The model assumes point=0.00001 and 5 digits. CSV levels explicitly belong to the final snapshot, not earlier rows. Spreads, fills and returns were not measured. Scroll horizontally on narrow screens.
Download the snapshot illustration data (CSV) · 1Download the snapshot illustration data (CSV) · 2
Master switch, point thresholds and state changes
EnableNotify=false, SendAlert=true; SendApp, SendEmail and SendSound=false. Enabling the master allows popup attempts. Email/push require terminal setup and retain broker company, account name and account number in messages. For sound-only, enable the master and SendSound, and disable SendAlert. Downloading activates nothing.
The edition chooses the nearest available side by integer point distance, with resistance winning a tie. No level gives NO LEVEL FOUND. DANGER means distance ≤SafeDistance; SAFETY means >SafeDistance. These are proximity categories, not permission to trade. The first valid observed state is skipped; later state or level changes can trigger attempts. A same-level exit/re-entry can notify on a later chart bar, while another level may notify within the same bar. Failed delivery still consumes state.
DrawArrowEnabled also needs EnableNotify; it can draw with all delivery channels off. Near resistance uses a down marker, near support an up marker and far distance a diamond, at current Bid/current chart time. Only one marker per chart bar is drawn, even if several messages are attempted. No historical marker replay occurs. Reattaching resets notification state; there is no cooldown input.
Compile and install all matching-platform dependencies
Choose MQ4 for desktop MT4 or MQ5 for MT5. These modified ZIPs contain source without a ready modified EX4/EX5. Both platforms need the icon and their own include helpers.
- Download and extract the matching platform ZIP.
- In MetaTrader: File → Open Data Folder → MQL4 or MQL5.
- Copy Indicators, Files and Include into that directory. Do not mix platform helpers; upstream is unchanged reference source.
- Open Support_Resistance_ForexBestRobots.mq4 or .mq5 in the matching MetaEditor, Compile(F7) and inspect errors.
- Refresh Navigator → Indicators, attach to demo with a unique IndicatorName and inspect history, panel, current buffers and Experts/Journal before enabling notifications.
ForexBestRobots has not compiled or executed these sources in MetaTrader. Independent OHLC and source/index checks do not replace native testing of handles, MTF clocks, Fractals, objects, EA reads or delivery. Test the compiled program on demo first.
Download Support & Resistance Lines ForexBestRobots edition free
Each ZIP contains marked modified source, untouched original reference source, the matching icon/includes, full Apache 2.0 license, change log, patch, instructions and SHA-256 checksums. No registration or broker account is needed to download.
ForexBestRobots 1.04 identifies our derivative of EarnForex 1.03. Original copyright notices remain and changes are marked. Original source and dependencies match the corresponding official platform ZIP byte for byte. Compile the modified program rather than expecting the author’s compiled binary to represent these changes.
Free source ZIP · ForexBestRobots 1.04 · Compile in MetaEditor
Changing levels, current-only buffers and verification limits
A historical Fractal requires later candles; the latest candidate can remain provisional. Rebuilding also changes the rolling window, ATR and price-bin membership. BarsToIgnore does not freeze ATR0 or guarantee unchanging levels. A long horizontal line on a current chart is not proof that the level was tradable at its left edge. No trade or stop management is performed.
EA reads use current index 0 only. In LEVELS, buffers 0–3 hold four support prices far-to-near, with 3 nearest; 4–7 hold resistance prices near-to-far. Missing slots are 0. Exact price equality is included in nearest-distance search but excluded from strict LEVELS slots. DISTANCES uses 0=valid far flag, 1=above price, 2=below price, 3=resistance distance, 4=support distance, 5–7=0. Missing distances use INT_MAX. These are not BUY/SELL codes or a historical backtest series.
The edition clears invalid output, uses the same ignored source window for range and Fractals, handles missing/tied levels and releases MT5 handles. Oversized grid/work requests can be refused. Independent strict-five-bar and ATR-bin models do not execute MQL or certify native tie/plateau rules, seeds, MTF drawing, ticks, EA integration, delivery, costs or profitability.
Frequently asked questions
Do MT4 and MT5 have identical scan defaults?
No. MT4 MaxBars defaults to 500 and MT5 MaxBarsExt to 100. Set the same length before comparing; native history and Fractal handling can still differ.
Does SAFETY mean a trade is safe?
No. It requests a distance category. This edition uses FAR FROM LEVEL, NEAR LEVEL and NO LEVEL FOUND; no label establishes a safe trade or guarantees a bounce.
Are 50 points always 50 pips?
No. Point size depends on the symbol. On five-digit EUR/USD, 50 points=0.00050=5 pips. Confirm your broker’s symbol digits.
Why are no arrows visible?
They default off. DrawArrowEnabled also requires EnableNotify; the first valid state is skipped and only one marker per chart bar is drawn. They are live proximity markers, not historical trade entries.
Can I use the buffers for a historical strategy test?
They support current index 0 reads, not historical replay. Handle zero/missing slots and INT_MAX. Compile the correct source/dependencies and test native EA reads on demo; ForexBestRobots has not done native compilation or execution.
Sources and scope of the review
The original code, license, icon and includes are pinned to an EarnForex revision. The review distinguishes source rules, marked changes and independent strict-five-bar/ATR illustrations. Numerical agreement between our models is not native terminal certification.