EA on “Supertrend MTF Heikin Ashi Auto” indicator from TradingView exactely the same for MT5

仕事が完了した

実行時間49 日
依頼者からのフィードバック
best developer so far
開発者からのフィードバック
Thank you!

指定

This Expert Advisor (EA) is designed to operate on the XAUUSDm symbol (Gold micro), using the 1-minute timeframe as the main chart and the 5-minute timeframe as the higher timeframe.
It is built to follow the logic of the “Supertrend MTF Heikin Ashi Auto” indicator from TradingView, exactly as shown in the reference screenshot.
The EA must fully comply with all detection, validation, and execution conditions explained below.

The Expert Advisor will be accepted only if it perfectly replicates the trades generated by the TradingView indicator "Supertrend MTF Heikin Ashi Auto" on the symbol XAUUSDm (Exness account), using the 1-minute chart for entries and the 5-minute chart for higher timeframe confirmation, during the full period from 15 March 2025 to 22 April 2025. It must detect the exact same Signal Candles, correctly wait for and confirm pullbacks, and execute trades precisely at the next candle open (Ask price for Buy, Bid price for Sell). Stop Loss must match the value of the 1-minute Supertrend at the Signal Candle, and all trades must include a trailing stop loss calculated as a percentage of the original SL. All entry and exit prices must be identical to those produced by the TradingView strategy—any deviation, missed trade, or incorrect execution will result in the EA being rejected.

The EA includes user options to:
Trade Buy signals only
Trade Sell signals only
Trade both Buy and Sell signals

It also includes a Trailing Stop Loss system based on the original Stop Loss, which dynamically protects profits once the trade moves in a favorable direction.

🔷 Buy Trade Setup
✅ Step 1 – Detect the Signal Candle
Monitor each new candle as it closes.
You are looking for the first candle where both of the following conditions are met :
The higher timeframe Supertrend  turns bullish (a blue line appears below the same candle).
The current timeframe Supertrend also turns bullish (a green line appears below the candle).
When both conditions are met, that candle becomes the "Signal Candle."

✅ Step 2 – Record Key Values from the Signal Candle
Once the Signal Candle is identified:
Signal Close Price:
This is the closing price of the Signal Candle.
It will be used later to confirm the pullback condition.
Stop Loss Level:
This is the value of the HTF Supertrend line (blue) at the time the Signal Candle closes.
This line represents the dynamic support calculated from the higher timeframe's Heikin Ashi-based Supertrend.
This value will be used as the Stop Loss for the trade.
📌 Example:
If the HTF Supertrend value at the Signal Candle is 3321.47, that becomes your exact Stop Loss.

✅ Step 3 – Wait for a Pullback
After the Signal Candle is closed, do not enter a trade immediately.
Start monitoring the subsequent normal candles (not Heikin Ashi).

✅ Step 4 – Confirm the Pullback
For each new candle after the Signal Candle:
If a candle closes with a closing price lower than the Signal Close Price, the pullback is confirmed.
This confirms a retracement after the bullish signal.

✅ Step 5 – Execute the Buy Trade
Once the pullback candle closes below the Signal Close Price:
Enter a Buy trade immediately at market on the next candle's open  using the market Ask price).
Set the Stop Loss at the HTF Supertrend line value recorded at the Signal Candle.
take profit

A Risk:Reward ratio based on the Stop Loss.
Sell Trade Setup
Step 1 – Detect the Signal Candle
Monitor each new 1-minute candle at close.

Wait for the following:

The 5-minute Supertrend is already bearish (red line above M1 candles).
Sell Trade Setup

Then, a 1-minute candle shows a new red Supertrend line above it (1-minute Supertrend turns bearish).

✅ This candle becomes the Signal Candle.

✅ Step 2 – Record Key Values
Signal Close Price → closing price of the Signal Candle.

Stop Loss → value of the 1-minute Supertrend red line at the Signal Candle close.

📌 Example: If SL = 2346.25, store that value for trade management.

✅ Step 3 – Wait for Pullback
Do not enter the trade immediately.

Watch for a candle that closes above the Signal Close Price.

✅ Step 4 – Confirm Pullback
When a candle closes above the Signal Close Price, it confirms a pullback.

✅ Step 5 – Execute the Sell Trade
Enter a Sell trade at market on the next candle open (Bid price).

Use the previously stored 1-minute Supertrend value as Stop Loss.

✅ Take Profit & Trailing Stop Loss
You must enable a Trailing Stop Loss to manage exits.

🔄 Trailing Stop Loss – Logic:
As price moves in your favor, the stop loss will trail behind price by a fixed distance.

This trailing distance is defined as a percentage of the original Stop Loss.

Supertrend MTF Heikin Ashi source code
@version=4
study("Supertrend MTF Heikin Ashi", overlay = true)
mode =input(title = "HTF Method", defval = 'Auto', options=['Auto', 'User Defined'])
//auto higher time frame
HTFo =timeframe.period == '1' ? '5' : 
  timeframe.period == '3' ? '15' : 
  timeframe.period == '5' ? '15' : 
  timeframe.period == '15' ? '60' : 
  timeframe.period == '30' ? '120' : 
  timeframe.period == '45' ? '120' : 
  timeframe.period == '60' ? '240' : 
  timeframe.period == '120' ? '240' : 
  timeframe.period == '180' ? '240' : 
  timeframe.period == '240' ? 'D' : 
  timeframe.period == 'D' ? 'W' :
  timeframe.period == 'W' ? '5W' :
  'D'
  
HTFm = input('5', title = "Time Frame (if HTF Method=User Defined)", type=input.resolution)
HTF = mode == 'Auto' ? HTFo : HTFm

Mult = input(defval = 2.0, title = "ATR Factor", minval = 0.5, maxval = 100, step = 0.1)
Period = input(defval = 7, title = "ATR Period", minval = 1,maxval = 100)

// current time frame

//Heikin Ashi high, low, close
h = security(heikinashi(syminfo.tickerid), timeframe.period, high)
l = security(heikinashi(syminfo.tickerid), timeframe.period, low)
c = security(heikinashi(syminfo.tickerid), timeframe.period, close)

//HeikinAshi atr
Atr = security(heikinashi(syminfo.tickerid), timeframe.period, atr(Period))

Up = (h + l) / 2 - (Mult * Atr)
Dn = (h + l) / 2 + (Mult * Atr)

float TUp = na
float TDown = na
Trend = 0

TUp := c[1] > TUp[1] ? max(Up,TUp[1]) : Up
TDown := c[1] < TDown[1] ? min(Dn,TDown[1]) : Dn
Trend := c > TDown[1] ? 1: c < TUp[1]? -1: nz(Trend[1],1)
Trailingsl = Trend == 1 ? TUp : TDown
linecolor = Trend == 1 and nz(Trend[1]) == 1 ? color.lime : Trend == -1 and nz(Trend[1]) == -1 ? color.red : na
plot(Trailingsl, color = linecolor ,  linewidth = 2, title = "SuperTrend")

// Higher Time Frame

////// HTF high, low, close
highhtf = security(heikinashi(syminfo.tickerid), HTF, high[1], lookahead = barmerge.lookahead_on)
lowhtf = security(heikinashi(syminfo.tickerid), HTF, low[1], lookahead = barmerge.lookahead_on)
closehtf = security(heikinashi(syminfo.tickerid), HTF, close[1], lookahead = barmerge.lookahead_on)

// ATR for HTF
HTfatr = security(heikinashi(syminfo.tickerid), HTF, atr(Period)[1], lookahead = barmerge.lookahead_on)

Uphtf = abs(highhtf + lowhtf) / 2 - (Mult * HTfatr)
Dnhtf = abs(highhtf + lowhtf) / 2 + (Mult * HTfatr)

float TUphtf = na
float TDownhtf = na
TrendHtf = 0

TUphtf := closehtf[1] > TUphtf[1] ? max(Uphtf, TUphtf[1]) : Uphtf
TDownhtf := closehtf[1] < TDownhtf[1] ? min(Dnhtf,TDownhtf[1]) : Dnhtf
TrendHtf := closehtf > TDownhtf[1] ? 1 : closehtf < TUphtf[1] ? -1: nz(TrendHtf[1], 1)
TrailingslHtf = TrendHtf == 1 ? TUphtf : TDownhtf

linecolorHtf = TrendHtf == 1 and nz(TrendHtf[1]) == 1 ? color.blue : TrendHtf == -1 and nz(TrendHtf[1]) == -1 ? color.red : na
st = plot(TrailingslHtf, color = linecolorHtf ,  linewidth = 3, title = "Supertrend HTF")

plot(TrendHtf == 1 and TrendHtf[1] == -1 ? TrailingslHtf : na, title="Supertrend HTF Trend Up", linewidth = 4, color=color.blue, style = plot.style_circles)
plot(TrendHtf == -1 and TrendHtf[1] == 1 ? TrailingslHtf : na, title="Supertrend HTF Trend Down", linewidth = 4, color=color.red, style = plot.style_circles)

//Alerts
alertcondition(Trend == 1 and Trend[1] == -1, title='Supertrend Trend Up', message='Supertrend Trend Up')
alertcondition(Trend == -1 and Trend[1] == 1, title='Supertrend  Trend Down', message='Supertrend Trend Down')
alertcondition(TrendHtf == 1 and TrendHtf[1] == -1, title='Supertrend HTF Trend Up', message='Supertrend HTF Trend Upl')
alertcondition(TrendHtf == -1 and TrendHtf[1] == 1, title='Supertrend HTF Trend Down', message='Supertrend HTF Trend Down')

ファイル:

PNG
BUY.png
187.0 Kb
PNG
SELL.png
210.5 Kb

応答済み

1
開発者 1
評価
プロジェクト
0
0%
仲裁
1
0% / 100%
期限切れ
0
2
開発者 2
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
3
開発者 3
評価
(574)
プロジェクト
945
47%
仲裁
309
58% / 27%
期限切れ
125
13%
4
開発者 4
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
類似した注文
can anyone help me with building a complete automated pine code strategy and indicator that work for both FXs & CFDs and have a high winning rate proved through back testing. I have a very complex current code that developed mostly using AI but lots of gaps are there although it translate exactly what I have in my mind. So, you are free to decide whether wo build a complete new code or fix my current working code ( i
Project Title: Convert Pinescript TradingView Strategy to MQL5 to EA bot Project Description: I am looking for an experienced MQL5 developer to convert a TradingView Pine Script strategy into a fully automated MetaTrader 5 Expert Advisor (EA). The goal is to have an identical replication of the strategy logic and backtest results. Key Requirements: Logic Conversion: Translate all Pine Script indicators, entry
描述(项目概述): 我需要为 MetaTrader 5 平台开发一个功能完整的智能交易系统( 专家顾问 ),用于交易 XAUUSD (伦敦金)。该 艺电 的核心是基于一份详细的技术规格书,实现一个多指标共振、多层条件过滤的短线反转策略。 1. 核心策略逻辑简述: 交易品种与周期:主交易周期为 M30 ,需在代码内部动态读取 H4 周期进行趋势过滤,并监控 M5 周期以执行复杂的出场逻辑。 入场机制:采用 “ 价格触发 -> 成交量确认 -> 多指标渐进式达标 ” 的严格流程。入场信号需在特定时间窗口内,同时满足布林带突破及 5 个动量指标( CCI、RSI、MFI, 威廉指标, 随机指标)的超买 / 超卖条件,并受 H4 级别趋势过滤器约束。 出场机制:采用三层递进逻辑,包括动态保本移动、 M5 周期指标集体反转信号以及基于 K 线形态的趋势反转终极止损。
SMC, etc.) - Backtest results and the set files you used - Whether you’re willing to make minor tweaks so I can use it as my own If the performance looks good, we can discuss adjustments and next steps. My requirements are screenshot, backtes results, demo fileS Let me know if you have anything that fits the bill
iF you already have an successful MT4 EA for scalping in M5 XAUUSD [and eventually EURUSD and USDJPY] working essentially ON the trend when there is an Break Of Structure but also on reversal eventually with strategy Martingale with param ON/OFF eventually with strategy Grid with param ON/OFF eventually with HEDGING with param ON/OFF and on each trade : Stop loss, Trailing sl without High Frequency Trades [means
I’m looking for a NinjaTrader 8 developer to build or customize a fully automated futures strategy . Goals: Target ~$100/day (consistency over aggression) Long-term survivability (not scalping hype) Requirements: Trade ES/MES or NQ/MNQ Fixed risk per trade Daily profit & loss limits Time/session filters Break-even & trailing stop logic Full NT8 strategy (not indicator) Nice to have: Backtest + optimization
Je cherche un développeur pour un bot Fundednext pour le passage de challenge jusqu'au trading quotidien après le passage.le robot va s'occuper du compte du début à la suite du compte de 15k chez Fundednext.après le passage aux challenges,le robot doit être capable de me fournir 6-10% mensuel de rendement de ce compte. Il doit être capable de passer le challenge dans un bref délai de 2-3 semaine ou soit 10-15 jours
🧠 Project Overview We require an automated trading system that performs statistical arbitrage between: XAGUSD (MT5 account) MCX Silver (separate broker / API / account) The bot will calculate custom percentage movement from a daily anchor time and trade based on spread convergence, not broker-provided percentage values. --- 🧩 Core Concept The system must: 1. Capture daily anchor prices at 11:30 PM IST 2. Compute
Job Title MT5 Developer Needed – Sync Data Feed Between Two MT5 Accounts Job Description I am a trader using multiple MT5 accounts and need a reliable way to have the same market data from one MT5 account reflected in another MT5 account. One account already has a stable and accurate data feed, and I want the second MT5 account to receive identical pricing and symbols for analysis and execution purposes. What I Need
hello great developer We are looking for someone to create a Ninja Trader bot that can identify liquidity sweeps using lux algos indicator. once liquidity sweep occurs we need the bot to use the fibonnachi tool to idenfity the 61% level and 71% level. then enter the trade for us please check the video for better understanding Here is first video: https://youtu.be/ZaGZGNgzZlc?si=we3poeWB91nWqkz5 Here is Second video

プロジェクト情報

予算
60+ USD
締め切り
最高 15 日