Support and Resistance Based on Fractals

MQL5 Indicators

Job finished

Execution time 58 days

Specification

Inputs

  1. Number of bars to the left of fractal
  2. Number of bars to the right of fractal
  3. Number of bars we look back from the current bar (e.g., 30)
  4. Number of most recent up (or down) fractals we consider (e.g., 3) within the look-back period (from input 3) to form a valid level
  5. Option to either consider last consecutive fractals OR simply all fractals meeting criteria (within the look-back period for both)
  6. Fractals' distance from each other in order to form a valid level; it can be set as a fixed percentage, value, pips or dynamically calculated based on another indicator being a coefficient times current ATR or StdDev (e.g., within 1/3*ATR from each other)
  7. Draw level at either last fractal’s value or candle’s high (or low) associated with last fractal
  8. Terminate level after x bars
  9. Too far criteria for termination of drawn level (fixed distance, percentage, pips or coefficient*ATR or StdDev) with an option to turn it ON/OFF
  10. Indicators’ settings (different settings can be used for input 6 and 9)
  11. Anything else that is useful (suggestions are welcome)

Criteria for Finite Support or Resistance

A support or resistance level should be finite when any of the following conditions are met:

  • A new support or resistance level forms, meeting the updated criteria
  • Finite/terminate level after x bar
  • Price moved significantly far away from the level. Far being either a fixed value, pips, percentage difference or a coefficient*(ATR or StdDev) from the level, indicators value associated when price was last time at the level’s value. Example: price is currently at 78, valid level is at 74, we look at the indicators’ value when price was last time at 74 and not current levels because in fast-moving markets, indicators' values increase.

This is mainly implemented to keep the levels relevant.

Example Inputs

Assume we have the following settings:

  • Bars to the left of fractal: 2
  • Bars to the right of fractal: 2
  • Look-back period (bars): 30
  • Recent fractals count: 3
  • Consecutive mode
  • Distance between fractals: Fixed at 0.05%
  • Draw from last fractal value
  • Terminate level after 20 bars
  • Terminate if prices are 4*ATR or more far from drawn level
  • Default settings
  • ...

With these settings, in the last 30 bars, if the last 3 (so consecutive) or more down fractals (using 2 bars left, 2 bars right) have no more than a 0.05% difference from each other, a resistance line is drawn at the last fractal value. If either a new resistance is formed OR 20 bars passed OR price moved 4ATR from the level, we stop drawing the resistance for the future while letting the level visible for the whole period it was valid.

Purpose

This will be used in various Expert Advisors to detect potential turning points in the market (trade breakouts, failed breakout, etc.).

Quality

The indicator needs to be reliable, robust and non-repainting.


Note

The x-bar fractals indicator is provided to you for ease of programming.

I'm open to any suggestions or ideas to improve the indicator.

Responded

1
Developer 1
Rating
(62)
Projects
90
29%
Arbitration
24
13% / 58%
Overdue
7
8%
Working
2
Developer 2
Rating
(51)
Projects
71
37%
Arbitration
4
25% / 75%
Overdue
1
1%
Free
Published: 1 code
3
Developer 3
Rating
(435)
Projects
641
53%
Arbitration
34
62% / 21%
Overdue
6
1%
Working
4
Developer 4
Rating
(20)
Projects
23
39%
Arbitration
4
25% / 50%
Overdue
1
4%
Free
Published: 5 codes
5
Developer 5
Rating
(619)
Projects
722
33%
Arbitration
46
48% / 41%
Overdue
14
2%
Loaded
6
Developer 6
Rating
(78)
Projects
246
74%
Arbitration
7
100% / 0%
Overdue
1
0%
Free
Published: 1 article
7
Developer 7
Rating
(45)
Projects
91
13%
Arbitration
34
26% / 59%
Overdue
37
41%
Free
8
Developer 8
Rating
(443)
Projects
570
37%
Arbitration
106
39% / 33%
Overdue
17
3%
Free
9
Developer 9
Rating
(29)
Projects
33
27%
Arbitration
20
10% / 50%
Overdue
11
33%
Free
10
Developer 10
Rating
(69)
Projects
146
34%
Arbitration
13
8% / 62%
Overdue
26
18%
Free
Published: 6 codes
Similar orders
Hello Traders, Have a trading strategy or idea you want to automate? I specialize exclusively in MQL5 development, helping traders turn their concepts into professional trading solutions. Custom Expert Advisors — automate your strategy and reduce manual execution Custom Indicators — transform your market ideas into powerful trading tools Fix & Debug — identify errors and get your existing code working properly
I DO NOT need any programming or strategy development. I already have a working NinjaTrader 8 automated strategy based on a 3/5 EMA crossover. I need you to run my existing strategy through NinjaTrader Strategy Analyzer/Optimizer, test the existing adjustable parameters, and find robust settings with the best profit factor and lowest reasonable drawdown. I will provide the existing NinjaScript ZIP. I do not want the
I'm looking for an experienced developer to create an automated gold trading bot. The bot should be compatible with MetaTrader 4/5 and TradingView. Key Requirements: - Automated trading bot - Compatible with MetaTrader 4/5 and TradingView - Implement scalping and swing trading strategies Ideal Skills and Experience: - Proficiency in trading algorithms - Experience with gold trading - Familiarity with MetaTrader and
I need a robust optimization of my MT5 EA, mainly for XAUUSD (Gold). Please optimize the existing adjustable parameters such as entry/exit settings, SL/TP, trailing/break-even settings, and any other strategy parameters that are appropriate. I want the optimization focused on stable profitability, low/moderate drawdown, and robustness rather than simply the highest possible profit. Please use out-of-sample testing
I want someone to check if the indicator is re-painting or drawing and modify it. When I refresh the chart sometimes it the buy and sell arrow change positions. I want the indicator draw and dot re-paint
NinjaTrader 8 / NinjaScript Phase 1 build: convert an existing Auction Market Theory (AMT) strategy into objective, alert-only decision-support logic. Not a bot, no auto-execution — trades stay manual. Covers NQ/MNQ, ES, CL, MGC using 30-min TPO/Volume Profile context with 5-min confirmation: one 5-min close outside VAH/VAL = acceptance, close back inside = rejection. Dashboard shows bias, auction state, location
Hello, I need a custom NON-REPAINT MT5 indicator that gives sell/buy arrow signals 1–2 candlesticks before a spike on Crash and boom indices respectively occurs. Requirements: Works perfectly on MT5 Shows arrows before the spike (1–2 candles earlier). Non-repaint – once the arrow appears, it must stay. Should be accurate, not quantity — only quality signals. Must work on both demo and live accounts. I want the
Hello, I saw an indicator on TradingView and would like to know if you will be able to convert it for use on Thinkorswim platform? Thanks. if anyone can help me with it kindly do well to bid it urgent thanks looking forward too see you
calcVolume( void ) { //--- MqlRates rates[]; if ( CopyRates ( _Symbol , PERIOD_CURRENT , startTime, endTime, rates) > 0 ) { double rangeHigh = rates[ 0 ].high, rangeLow = rates[ 0 ].low; int count = MathAbs ( iBarShift ( _Symbol , PERIOD_CURRENT , startTime) - iBarShift ( _Symbol , PERIOD_CURRENT , endTime)) + 1 ; //---VERTICAL PRICE RANGE for ( int b = 0
Create an MT5 Expert Advisor (EA) for trading Gold (XAUUSD). The EA should provide BUY and SELL signals based on trend direction, market momentum, and price action. It should automatically place trades only when the entry conditions are met. Risk management: Use a small adjustable lot size. Include Stop Loss (SL) and Take Profit (TP). Include a maximum daily loss limit. Include a maximum number of open trades. Do not

Project information

Budget
30 - 115 USD
Deadline
from 7 to 14 day(s)