MT5 Indicator with alerts and labels for HTF Engulfing or HTF Hammer/Shooting Star Bar Play (EHBP) with Multi-Timeframe Validation

仕事が完了した

実行時間8 日

指定

Only apply if you have experience in building multitimeframe indicator. Do not use any software to generate the code automatically.

Code should be concise and proper as per best practices and typed by you.


MQL5 Indicator Requirements: HTF Engulfing or HTF Hammer/Shooting Star Bar Play (EHBP) with Multi-Timeframe Validation


1. Input Parameters

Timeframe Selection

  • Higher Timeframe (HTF):

    • Options:  1 Month ,  1 Week ,  1 Day ,  8 Hour ,  4 Hour ,  2 Hour ,  1  Hour , 15 Minute

    • Default:  1 Day

  • Lower Timeframe (LTF):

    • Options:  1 Month ,  1 Week ,  1 Day ,  8 Hour ,  4 Hour ,  2 Hour ,  1  Hour , 15 Minute

    • Default:  4 Hour

  • Validation:

    • Ensure  LTF < HTF  (e.g., if HTF= 4 Hour , LTF cannot be  8 Hour ).

    • Show error message and disable calculations if invalid.


2. Core Logic

Step 1: Detect HTF Engulfing or Hammer Candle closure + PO3 Signals

  • Bullish Signal (HTF candle):

    • low < previous low   AND   close > previous open AND close >  Previous close  AND   close in Lower Timeframe above  retracement level of selected Fib after breaching below it in lower timeframe but closing above it in lower timeframe candle . Its not necessary that the HTF candle High will be above the high of its previous candle. Still it should be considered if other conditions are met.

  • Bearish Signal (HTF candle):

    • high > previous high  AND  close < previous open AND CLOSE < PREV close  AND   close in Lower Timeframe below retracement level of selected Fib after breaching above it in lower timeframe but closing below it in lower timeframe candle

      Its not necessary that the HTF candle Low will be below the low of its previous HTF candle. Still it should be considered if other conditions are met.

Step 2: Calculate Retracement Levels

For each HTF signal, compute Fibonacci levels as per selection multiple Fib levels can be selected like 26 percent, 38 percent, 50%, 61.8 percent etc:

  • Bullish:

    Copy

    25% = HTF High - (HTF High - HTF Low) * 0.25 38.2% = HTF High - (HTF High - HTF Low) * 0.382 50% = (HTF High + HTF Low) / 2 ...

  • Bearish:

    Copy

    25% = HTF Low + (HTF High - HTF Low) * 0.25 38.2% = HTF Low + (HTF High - HTF Low) * 0.382 ...

Step 3: Track LTF Candle Closes

For each LTF candle close:

  • Bullish Signal Check:
    If LTF candle:

    • Breached below a retracement level (intra-candle  low < level ).

    • Closed above the same level ( close > level ).
      → Trigger alert/label.

  • Bearish Signal Check:
    If LTF candle:

    • Breached above a retracement level (intra-candle  high > level ).

    • Closed below the same level ( close < level ).
      → Trigger alert/label.


3. Visualization & Alerts

Labels

  • Display only after LTF candle closes and conditions are met.

  • Format:

    • EBP [Level] Held (LTF)

    • Example:  EBP 38.2% Held (4H)

  • Placement:

    • Below/above the LTF candle that triggered the condition.

Retracement Lines

  • Plot horizontal lines for all active levels.

  • Color Coding:

    • Bullish: Shades of green.

    • Bearish: Shades of red.

Alerts

  • Trigger only after LTF candle closes. Give meaningful alerts which are descriptive and easy to understand. Print symbol name in alerts. In Chart labels show small labels like Green Up traingle for Bullish Setup and Red down triangle for Bearish setup.

  • Message Examples:

    • XAUUSD Bullish 38.2% Level Held on 4H LTF on 1 Day HTF at time 09:00 AM Swing Low in LTF price is 2912.

    • XAUUSD Bearish 61.8% Level Held on 2H LTF on 1 Day HTF  at time 02:00 PM Swing High in LTF price is 2952.


4. Technical Implementation

Key Functions

  1. Timeframe Validation:

    mql5
    Copy

    bool validateTimeframes() { int htfMinutes = convertToMinutes(htfInput); int ltfMinutes = convertToMinutes(ltfInput); return (ltfMinutes < htfMinutes); }

  2. Track Active Signals:
    Use arrays/structs to store:

    • HTF signal type (bullish/bearish).

    • Retracement levels.

    • Corresponding LTF candle timestamps.

  3. Check LTF Closes:

    mql5 code example just for reference

    void checkLTFCloses() {  
      for (int i = 0; i < arraySize(activeSignals); i++) {  
        // Get retracement levels for signal[i]  
        for (int j = 0; j < levelsCount; j++) {  
          double level = activeSignals[i].levels[j];  
          if (isBullish) {  
            bool breached = ltfLow < level;  
            bool closedAbove = ltfClose > level;  
            if (breached && closedAbove) triggerAlert();  
          } else {  
            bool breached = ltfHigh > level;  
            bool closedBelow = ltfClose < level;  
            if (breached && closedBelow) triggerAlert();  
          }  
        }  
      }  
    }  

No Repainting

  • All labels/alerts are tied to closed LTF candles (confirmed price action).


5. Example Workflow

  1. HTF Signal: Bullish Engulfing + PO3 on  1D  candle.

  2. Calculate Levels: 25% = 1900, 38.2% = 1850, 50% = 1800.

  3. LTF Candle (4H):

    • Candle 1: Low = 1845 (breaches 38.2%), Close = 1855 → Triggers alert/label.

    • Candle 2: Close = 1895 (no breach) → No action.

  4. Labels: Display  EBP 38.2% Held (4H)  below Candle 1 after it closes.


6. Deliverables

  1. Indicator Code:

    • .mq5  file with input validation, multi-timeframe logic, and alerts. Source code and executable both for MT5. Strategy should work in Strategy tester also when replaying.

  2. Documentation:

    • Clear comments explaining HTF/LTF interaction. Inline comments and Header comments.

  3. Testing:

    • Verify on  EURUSD  (HTF=1D, LTF=4H). XAUUSD, USOIL, US30, BTCUSD on various timeframe combinations.

    • Ensure labels/alerts never repaint.






Example of 50% fib retracement after a Bearish Engulfing HTF candle.











































応答済み

1
開発者 1
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
2
開発者 2
評価
(102)
プロジェクト
158
21%
仲裁
23
9% / 78%
期限切れ
16
10%
仕事中
3
開発者 3
評価
(3)
プロジェクト
4
0%
仲裁
0
期限切れ
0
4
開発者 4
評価
(62)
プロジェクト
76
54%
仲裁
2
0% / 50%
期限切れ
1
1%
パブリッシュした人: 6 codes
5
開発者 5
評価
(14)
プロジェクト
14
14%
仲裁
8
0% / 88%
期限切れ
2
14%
取り込み中
6
開発者 6
評価
(9)
プロジェクト
11
18%
仲裁
4
0% / 100%
期限切れ
4
36%
7
開発者 7
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
8
開発者 8
評価
(305)
プロジェクト
546
35%
仲裁
79
32% / 42%
期限切れ
196
36%
仕事中
9
開発者 9
評価
(2)
プロジェクト
3
0%
仲裁
8
13% / 88%
期限切れ
1
33%
類似した注文
I am looking of an Expert Advisor (EA) that has undergone independent validation and demonstrates a capability to successfully navigate prop firm challenges, as well as efficiently manage funded accounts. It is imperative that you provide a comprehensive explanation of the strategy utilized by your EA, along with a demo version that has a 30-day expiration. This will facilitate extensive back testing and forward
I am seeking a highly skilled developer to build a fully functional automated Expert Advisor for MetaTrader 5 (MQL5)- XAUUSD fast in and out EA scalper that opens multiple trades following trend, uses dynamic lot sizing, and has to be – 24/5 unlimited. require the development of a high-speed, continuous fully automated trading Expert Advisor (EA) for MetaTrader 5, optimized for live trading on ICmarkets. The EA must
Hellow,l hope you are well,l am writing to place an order for a professional trading robot.l am looking for a reliable,well optimized robot that can trade efficiently,manage risk properly and deliver consistent performance in the market,I am particularly interested in a trading robot that uses a proven and transparent strategy,has strong risk management features,works well on common trading platforms,is suitable for
I am looking for an experienced MQL5 developer to build a professional MT5 software (indicator or semi-automated EA) for metals and major forex pairs. 📌 PLATFORM & MARKETS Platform: MetaTrader 5 Instruments: XAUUSD (Gold vs USD) XAGUSD (Silver vs USD) EURUSD GBPUSD USDJPY Trading styles: Scalping Intraday / short-term swing 🎯 MAIN OBJECTIVE I do NOT want an aggressive fully automated robot. I want a
I am seeking an experienced freelance marketing and algorithmic trading specialist to develop a user-friendly automated trading bot for the Pocket Option platform. The system should feature a simple and secure interface that allows direct login using my existing credentials. The bot will be designed to operate exclusively on multiple OTC currency pairs (a minimum of 10, such as EUR/USD OTC, GBP/JPY OTC, and similar
The robot will take buy trades when the 2 ema cross over the 10 ema and price has closed above the 50 ema. The take profit and stop loss can be set as an optional level by the user. The robot will take sell trades when the 2 ema cross under the 10 ema and price has closed under the 50 ema. The take profit and stop loss can be set as an optional level by the user. The entry timeframe will be 15 minutes, but it could
GoldTrade EA 30 - 60 USD
Hi, I am looking for someone who has already developed a high-performance Gold EA that can outperform the one shown in my screenshot. If you have such an EA, please apply for this job. Please describe how the EA works (for example, whether it uses a grid system) and provide backtest results along with the set files. If the EA meets my expectations, you can make the necessary adjustments and I will use it as my own
I am looking for someone who has or who can modify the Margin Trader EA by MaryJane preferably the MT5 version by making it pyramid using a fixed lot size addition(preferably 1st trade lot size) instead of using all the margin available to define the lotsize
Create simple EA 30 - 60 USD
Start BUY:- when i click start BUY button new panel should open which should contain bellow points:- Trigger Price Time frame Cross/Close RR ration Trailing Stop ratio Maximum Trade count Risk (percentage or cash) (Option to Increase risk when SL hit) Remove Trigger (True/False ) I will explain above point one by one here bellow •Trigger price :- here we enter price at which when market cross or
I want to check if this indicator is repainting or not Whick mean the results of back testing is legit or not if anyone can help me to review it kindly to well to contact me i will be happy to work and go on long term work with anyone thanks

プロジェクト情報

予算
30+ USD
締め切り
最低 1 最高 2 日