Spécifications
Hello! I am looking for an experienced developer to build a robust, customizable Expert Advisor (MT4/MT5) or a standalone Python bot.
The strategy is based on pure Price Action (Support & Resistance breakouts) on the XAUUSD (Gold) 30-Minute chart. It relies heavily on "human-like" chart analysis, such as looking left for targets, waiting for a price pullback (a "flip") before entering, and managing the trade based on candle anatomy.
Since I want to backtest and optimize this strategy extensively, almost every hardcoded value in this brief needs to be a customizable input variable in the settings UI.
Please read the logic below carefully.
1. Session & Time Filters
The bot must only analyze the chart and execute trades during specific market windows.
-
London Session: 06:00 - 10:00 (Broker time / specify offset).
-
New York Session: 12:00 - 16:00.
-
Max Trades: The bot should stop trading after taking [X] trades per day.
2. Pre-Session Analysis: "Look Left & Shift" Logic (CRUCIAL)
Before considering an entry, the bot must map the Support/Resistance (S&R) and Targets.
-
Defining a Level: * Resistance: A bullish candle immediately followed by a bearish candle. The level is drawn at the highest body (math.max(open, close)).
-
Support: A bearish candle immediately followed by a bullish candle. The level is drawn at the lowest body (math.min(open, close)).
-
-
The 300 Points Rule & Shifting:
-
The bot looks left to find the first Resistance (R).
-
It looks further left to find the next Resistance (Target Resistance = RT).
-
The Check: Is the distance between R and RT >= 300 points (30 pips)?
-
The Shift: If the distance is LESS than 300 points, the initial Resistance (R) is ignored. The old RT becomes the new R, and the bot looks further left for a new RT. This continues until a valid >= 300 point gap is found. (Same logic applies to Support).
-
-
The "Blue Sky" Exception: If the bot looks left for [X] days/candles and cannot find a Target Resistance or Target Support (e.g., at an All-Time High), the target is considered "Infinite" (Free space), and the trade is allowed.
3. Breakout Confirmation
A valid setup occurs when:
-
A 30M candle strictly closes beyond the valid Resistance (for Long) or Support (for Short).
-
The Anatomy Rule: The breakout candle must have a wick on the breakout side. (e.g., A bullish breakout candle must have an upper wick; a bearish breakout candle must have a lower wick).
4. The Ideal "Flip" Entry (Live Tick Execution)
The bot does NOT enter blindly at the close of the breakout candle. It waits for the next candle (Candle 2) to "Flip":
-
The Pullback: Candle 2 opens and MUST initially move in the opposite direction (e.g., moves down after a bullish breakout, creating a lower wick).
-
The Entry Trigger: When Candle 2 reverses and crosses back over its own Open price (or [X] points past the open/wick), the bot executes a Market Order.
-
Time-out: If the "Flip" does not happen within [X] candles after the breakout, the setup is invalidated and canceled.
5. Stoploss, Take Profit & Range Check
-
Stoploss (Aggressive): Placed at the opposite body of the Breakout Candle. (e.g., For a Long, SL is at the bottom of the bullish breakout candle's body).
-
Take Profit: A strict 1:1 Risk/Reward ratio based on the physical Stoploss distance.
-
Final Range Check: Before executing the entry, calculate the 1:1 TP distance. If this TP level physically sits beyond the Target line (RT or ST), the trade is cancelled.
6. Trade Management: Two Red Flags (Break-Even)
While in an active trade, monitor the close of every new 30M candle. Move the Stoploss to Break-Even IF a single 30M candle meets both criteria:
-
It closes against the trade direction (e.g., a bearish close in a Long trade).
-
It takes out the high/low of the previous candle.
7. Required Customizable Inputs (User UI)
I need to be able to tweak these settings easily:
-
Risk Management: Risk per trade (% of Equity), Max Spread allowed (Points), Max Slippage.
-
Time Management: Session 1 Start/End, Session 2 Start/End, Max Trades Per Day.
-
Level Logic: Minimum distance between S/R and Target (Default: 300 points), Max Lookback Period for Targets (Days or Candles), Trade if no target found? (True/False).
-
Entry Logic: Flip Time-out (How many candles can pass before the flip is invalid? Default: 1). Entry offset (Enter exactly at open, or X% into the wick?).
-
Trade Management: Enable/Disable the Two Red Flags Break-Even logic.
Questions for the Developer:
-
Have you built "Look Left" array-based Support/Resistance logic before?
-
Do you understand the "Flip" live-tick execution on the candle following the breakout?
-
Which platform do you recommend for this specific logic to ensure the highest quality backtesting (MT4, MT5, or Python), and why?
-
What is your estimated timeline and price for this project?
Thank you for your time. I am looking for a high-quality, long-term developer to work with!