Работа завершена
Время выполнения 1 день
Отзыв от исполнителя
Very humble and patient, Quick and precise replies, careful focus on specifics.
Отзыв от заказчика
James went above and beyond to help me get what I was looking for. Thank you so much James!
Техническое задание
let me try to figure out how to create this Expert Advisor based on the user's requirements. The user wants an EA named Adriano_Signal that uses TMA Bands for both buy and sell signals. They mentioned using 3 TMA Bands for each direction, with adjustable multipliers. The entry rules involve a 2-period smoothed line crossing the lower TMA Bands for buys and the upper ones for sells. There's also a need for multiple stop loss levels, re-entry after a stop, no concurrent trades on the same band unless stopped, breakeven, trailing stops, take profit at the center line of each TMA Band, trading hours, and adjustable lot sizes per band.
First, I need to recall what TMA Bands are. TMA typically stands for Triangular Moving Average, but sometimes it's used for other indicators. Since the user mentioned multipliers, I think they might be referring to bands created around a central line, possibly using a multiplier of ATR or standard deviation. But since the user didn't specify, I'll assume that TMA Bands here are similar to Bollinger Bands but using a Triangular Moving Average as the base. Each band is calculated by adding/subtracting a multiplier times some volatility measure (like ATR) from the TMA. However, the exact calculation isn't provided, so I might need to clarify or make an assumption. Alternatively, the user might mean that each band is a TMA with different periods or multipliers. But given the example with multipliers 2.0, 3.5, 5.5, it's more likely that the bands are offset from a central TMA by these multipliers. Maybe the TMA is the center line, and upper/lower bands are calculated by adding/subtracting the multiplier times some value. However, without explicit details, I'll need to proceed with an assumption, perhaps using the TMA as the center and bands created using a multiplier applied to the average true range (ATR) or another volatility indicator.
Next, the entry rules: when the 2-period smoothed line crosses the lower TMA Bands, a buy order is triggered. Similarly for sells. The EA should place three different trades if the line crosses each of the three lower bands, each with their own stop loss. The same applies to sell trades with upper bands. Each trade corresponds to a specific TMA Band, and they can't have two trades open on the same band unless the previous one was stopped out. So, the EA needs to track which bands have active trades and only allow new ones after a stop loss.
The stop loss levels are 50, 100, 200 pips, but the user wants an option to change these. Wait, the user mentioned "stop loss 50,100, 200, I need option to change stop loss set". So each of the three TMA Bands can have their own stop loss value. For example, the first band (multiplier 2.0) might have a 50 pip SL, the second (3.5) 100, and the third (5.5) 200. But the user wants to be able to adjust these values, so input parameters for each band's SL.
After a stop loss, the EA should re-enter without confirmation as long as the smoothed line is still below the lower band (for buys). The same logic for sells. So, the EA needs to check if a previous trade on that band was stopped, and if the condition still holds, re-enter.
Breakeven rules: when the price moves a certain number of pips in profit, move the stop loss to breakeven. The user didn't specify the distance, so this should be an input parameter.
Trailing stop: once the price moves in favor by a certain number of pips, the stop loss trails by a specified step. Again, parameters needed for activation distance and step.
Take profit is at the center line of the TMA Bands. Each trade's TP is the center line corresponding to its band. So, for each band, the center line is the TMA value, and the TP for a buy trade would be that value. Similarly, for a sell trade, the TP is the center line, which might be lower than the entry if it's a sell.
Trading hours: the user wants to specify a time range in a particular time zone (like GMT). So inputs for start and end hours, and time zone selection.
Lot size per band: each of the three TMA Bands can have a different lot size. So input parameters for lot sizes for each band.
Now, putting this all together:
1. Define input parameters for each of the three TMA Bands (buy and sell). For each band, parameters include the multiplier, stop loss, lot size. Since buy and sell bands are separate, maybe the user wants three lower bands for buys and three upper bands for sells. Or perhaps the same three bands are used for both, but the direction is determined by the crossover. Wait, the user said "3 TMA Bands for buy and 3 tms bands for sell." So possibly, there are three lower bands (for buys) and three upper bands (for sells). Each band has its own multiplier, SL, and lot size. So input parameters would be arrays for each band's settings.
Wait, the example given by the user mentions "3 tma band with multiplier settings at 2.0,3.5, 5.5". So each band has a multiplier. For buy trades, when the smoothed line crosses below each lower band, a buy is triggered with corresponding SL. So each of the three lower bands has its own multiplier, SL, and lot size. Similarly for sell trades, upper bands with their own multipliers, SL, lot size.
But the user hasn't specified whether the TMA Bands are upper and lower around a central line, or if they are separate. The take profit is at the center line, so each band's TP is the center line. That suggests that each band is part of a set with a center line. Wait, maybe each TMA Band is a separate indicator with its own center line. For example, three separate TMA-based bands, each with their own center line and upper/lower bands. But that seems complicated. Alternatively, there's one central TMA line, and three lower bands (each at different multipliers below) and three upper bands (multipliers above). But the TP for a buy trade would be the central line, so if a buy is triggered by crossing a lower band, the TP is the central line. That makes sense.
So, the structure would be:
- A central TMA line (maybe the period is fixed or an input).
- For buy signals: three lower bands, each at a certain multiplier below the central TMA.
- For sell signals: three upper bands, each at a certain multiplier above the central TMA.
Each lower band has its own multiplier, SL, and lot size. Similarly for upper bands.
But the user mentioned "3 TMA Bands for buy and 3 tms bands for sell." So perhaps each buy band is a lower band with a multiplier, and each sell band is an upper band with a multiplier. Each of these bands has its own parameters.
The 2-period smoothed line is another indicator. The user didn't specify what kind of smoothing—maybe a simple moving average (SMA) or exponential (EMA). Since it's smoothed, perhaps EMA. The period is 2.
Entry conditions:
- For buy: when the 2-period smoothed line crosses below a lower TMA Band, enter a buy. Wait, the user wrote: "Entry buy Rules: When the 2 period smoothed line trigger or crosses the lower TMA bands a buy order should trigger". Wait, the exact wording is "crosses the lower TMA bands", but the example says "if the smoother line touch or crosses below each one the EA will place 3 different trade". So for buy, when the line crosses below a lower band, buy. But the example says "if the smoother line touch or crosses below each one", which could mean crossing below any of the three lower bands. Each crossing triggers a separate trade with its own SL and lot size.
Similarly, for sell: when the line crosses above an upper band, sell.
But the user also said, "if the order get stopped the EA should get in into another trade without any confirmation for entry and as long as the 2 period smoothed line is below the lower tma bands." So after a stop loss, the EA should re-enter as long as the line is still below the lower band (for buys). This suggests that the EA should continuously check and re-enter if the condition is still met after a stop.
Moreover, the EA shouldn't open two trades on the same TMA Band unless the previous one was stopped out. So each band can have only one active trade at a time. Once a trade on a band is closed (especially via stop loss), a new one can be opened if the condition is still met.
Now, coding this in MQL5:
First, need to calculate the TMA (Triangular Moving Average) for the central line. The TMA is an average of averages. For example, a TMA of period N is calculated as the average of an SMA of period N, which itself is the average of another SMA of period N. Alternatively, the TMA can be calculated as a moving average of another moving average. The exact formula needs to be clarified, but for the sake of coding, we'll use the iMA function with MODE_SMA and calculate the TMA accordingly. Wait, MQL5 has iMA for simple, exponential, etc., but not triangular. So the user might have a custom indicator for TMA. Alternatively, we can compute it in the EA.
Alternatively, perhaps the user is referring to the Tillson T3 Moving Average, but that's different. To avoid confusion, perhaps the TMA here is a Triangular Moving Average, which is a double-smoothed SMA. For a period N, the TMA is the average of the SMA(N) values over N periods. So, for example, TMA(20) would be the average of the last 20 SMA(20) values. To compute this, we can first compute the SMA of price over N periods, then compute the SMA of that SMA over N periods. So the code would involve two MA calculations.
Alternatively, maybe the TMA is calculated as (SMA(period) + SMA(SMA(period)) ) / 2. Not sure. But given that the user didn't specify, perhaps we can proceed by using a standard TMA calculation.
But regardless, the key is that each TMA Band is based on a central TMA line, and the bands are offset by a multiplier. The multiplier could be applied to the ATR, standard deviation, or a fixed value. The user mentioned "multiplier settings", so perhaps the bands are the central TMA plus/minus multiplier * ATR. But the example uses multipliers like 2.0, 3.5, 5.5, which are large for ATR (unless the ATR is very small). Alternatively, the multiplier could be a number of pips. But the exact method isn't clear. The user needs to clarify, but since they can't, I'll have to make an assumption. Let's assume that the bands are calculated as TMA_center +/- multiplier * ATR(ATR_period). So for each band, the upper and lower are calculated using the multiplier. The ATR period could be an input parameter.
Alternatively, the bands could be fixed offsets from the TMA, like TMA +/- multiplier * point. But that would depend on the instrument's price scale. The example given uses 2.0, 3.5, 5.5 as multipliers, which might correspond to 200, 350, 550 pips if the multiplier is in points. But that's quite large. Alternatively, perhaps the multiplier is applied to the standard deviation. Without more information, I'll proceed with the assumption that the bands are TMA_center +/- multiplier * ATR(ATR_Period). So we'll need an input for ATR period and use that to calculate the bands.
But the user hasn't mentioned ATR or standard deviation, so perhaps the bands are simply the TMA line multiplied by the multiplier. That doesn't make much sense. Alternatively, the bands are the TMA line plus a multiplier times the TMA's value. That also doesn't make sense. Maybe the bands are calculated as TMA_center * (1 +/- multiplier/100), treating the multiplier as a percentage. For example, a multiplier of 2.0 would be 2%, so the band is 2% above or below the TMA. But this would vary widely depending on the price. Alternatively, the bands are offset by a fixed number of points, where the multiplier is the number of points. So a multiplier of 2.0 would mean 20 pips (if the point is 0.0001 for EURUSD). But the example uses 2.0, 3.5, 5.5, which could be 200, 350, 550 pips. However, the user hasn't specified, so this is a critical point of ambiguity.
Given the lack of clarity, perhaps the safest approach is to define the bands as TMA_center +/- multiplier * _Point * some factor. For example, the user can input the multiplier as 200 for 200 pips, and the code would use multiplier * _Point. But the user's example uses 2.0, 3.5, 5.5, which might imply that the multiplier is in points, but that would be 20, 35, 55 pips. Alternatively, the multiplier is in terms of the TMA's standard deviation over a certain period. This is getting too vague.
Alternatively, the TMA bands could be similar to Keltner Channels, where the central line is an EMA, and the bands are EMA +/- multiplier * ATR. In this case, the TMA is the central line (maybe a double EMA or something), and the bands use ATR. But again, without the user's clarification, this is speculative.
Given the time constraints, I'll proceed with the assumption that the TMA bands are calculated as follows:
- The central line is a Triangular Moving Average (TMA) of a certain period.
- Each band (both buy and sell) is offset from the central line by a multiplier. For buy bands (lower), the offset is negative; for sell bands (upper), positive.
- The multiplier is in terms of ATR (Average True Range) over a specified period. So, for each band, the offset is multiplier * ATR(ATR_Period).
This approach allows the bands to adapt to market volatility. The user can adjust the multiplier for each band, and the ATR period can be an input parameter. However, the user didn't mention ATR, so this is an assumption. Alternatively, the multiplier could be in points, but that's less adaptive.
Given this, the code will need to:
1. Compute the TMA (Triangular Moving Average) for the central line.
2. Compute the ATR for the specified period.
3. For each of the three buy bands (lower), compute TMA - (multiplier_buy[i] * ATR).
4. For each of the three sell bands (upper), compute TMA + (multiplier_sell[i] * ATR).
Alternatively, maybe the buy and sell bands all use the same direction but with different multipliers. For example, three lower bands with multipliers 2.0, 3.5, 5.5, meaning progressively further from the central line. Similarly, three upper bands for sell.
But the user's example mentions "3 tma band with multiplier settings at 2.0,3.5, 5.5" for buy, so each buy band has its own multiplier. Similarly for sell.
Now, the entry rules: when the 2-period smoothed line (let's assume it's a 2-period EMA) crosses below a lower buy band, a buy order is triggered with the corresponding SL, lot size, etc. Each of the three buy bands can trigger their own trade, each with their parameters.
The EA must track for each band whether there's an active trade. If a trade is stopped, it can re-enter as long as the condition is still met.
Breakeven rules: when the trade is in profit by X pips, move SL to breakeven plus Y pips. Input parameters for X and Y.
Trailing stop: once price moves Z pips in profit, trail by W pips. Inputs for Z and W.
Take profit is the central TMA line. So when a buy trade is entered at a lower band, the TP is the current TMA value. Since the TMA is dynamic, the TP level might change over time. However, the user might want the TP to be fixed at the TMA value at the time of entry. Need to clarify, but the user said "take profit to be at the center line of the tma bands for each trade", which suggests that TP is the central line's value at the time the trade is opened. So when a buy is triggered by crossing the lower band, the TP is set to the central TMA value at that time. However, if the central line moves, the TP would not update unless the EA recalculates it. The user might want the TP to be static once the trade is opened. So in the code, when a trade is opened, record the central TMA value at that time as the TP level.
Trading hours: allow the user to set start and end hours in a specific time zone (e.g., GMT). The EA will only trade during those hours.
Lot size per band: each of the three buy and three sell bands can have their own lot size. So input parameters like BuyLotSize1, BuyLotSize2, BuyLotSize3, and similarly for sell.
Putting this all together, the code structure would involve:
- Input parameters for each band's multiplier, SL, lot size.
- Inputs for ATR period (if using ATR for bands).
- Inputs for TMA period.
- Inputs for the smoothed line (2-period EMA).
- Functions to calculate TMA, ATR, and the smoothed line.
- OnTick() function to check for crossovers, manage trades, apply breakeven, trailing stops, etc.
- Tracking active trades per band to prevent multiple entries unless stopped.
- Checking trading hours.
Potential challenges include efficiently tracking which trades correspond to which band, especially when multiple trades can be open across different bands. Each trade needs to be associated with a band (buy1, buy2, buy3, sell1, sell2, sell3) to manage re-entries and TP/SL levels.
To track trades, when a trade is opened, the EA can store a comment or magic number indicating which band it belongs to. For example, magic numbers could be 101, 102, 103 for buy bands 1-3, and 201, 202, 203 for sell bands. This allows the EA to check existing positions by magic number to determine if a trade is already open on a particular band.
The breakeven and trailing stop functions would need to iterate through all open positions, check their profit, and adjust stops accordingly.
The Take Profit level for each trade is set at the central TMA value at the time of entry. So when a trade is opened, the EA records the current TMA value and sets it as the TP.
Testing is crucial, especially with the dynamic TP and multiple bands. The EA must handle multiple concurrent trades, each with their own parameters, and correctly apply the trading hour filters.
In summary, the steps to code this EA are:
1. Define all input parameters.
2. Calculate necessary indicators (TMA, ATR, smoothed line).
3. On each tick, check if within trading hours.
4. For each buy band, check if the smoothed line has crossed below the band. If yes and no active trade on that band, open a buy trade with corresponding SL, TP, and lot size.
5. Similarly for sell bands, check if line crossed above.
6. After a trade is closed (especially via SL), check if the condition is still met and re-enter if allowed.
7. Implement breakeven and trailing stop logic.
8. Ensure TP is set to the central TMA value at trade entry.
9. Track trades using magic numbers to prevent multiple entries on the same band.
Potential pitfalls include incorrect indicator calculations, especially the TMA and bands. Also, ensuring that the EA correctly tracks trades per band and handles re-entries properly. Testing in the Strategy Tester with visual mode can help verify the behavior.
Here's the MQL5 code for "Adriano_Signal" EA based on your requirements. This implementation includes customizable TMA bands, multi-layer stop-loss/take-profit logic, breakeven, trailing stops, and time filters.
Откликнулись
1
Оценка
Проекты
175
44%
Арбитраж
3
100%
/
0%
Просрочено
5
3%
Свободен
Опубликовал: 1 пример
2
Оценка
Проекты
25
24%
Арбитраж
5
20%
/
80%
Просрочено
1
4%
Свободен
Опубликовал: 6 примеров
3
Оценка
Проекты
574
35%
Арбитраж
83
31%
/
45%
Просрочено
207
36%
Свободен
4
Оценка
Проекты
553
50%
Арбитраж
57
40%
/
37%
Просрочено
227
41%
Работает
5
Оценка
Проекты
145
46%
Арбитраж
21
38%
/
24%
Просрочено
32
22%
Свободен
6
Оценка
Проекты
0
0%
Арбитраж
1
0%
/
100%
Просрочено
0
Свободен
7
Оценка
Проекты
91
13%
Арбитраж
34
26%
/
59%
Просрочено
37
41%
Свободен
Похожие заказы
PROJECT: Automatic Gold and Forex Trading Robot for MetaTrader 5 (MQL5) I want a fully automated Expert Advisor (EA) for MetaTrader 5 that can analyze the market and automatically open, manage and close trades on Gold and selected Forex currency pairs. TRADING INSTRUMENTS Gold: XAUUSD Forex: EURUSD, GBPUSD and USDJPY, subject to broker availability. Allow the user to enable or disable each trading symbol. Support
I need a robot that will grow small accounts to bigger amounts like this one in this link, https://youtu.be/d38pMbJihew?si=3NeIOVyrlwDr4X_o. Please click the link and watch how this EA grow small accounts. Then create a robot like that. I will test it on demo first then if it does what i want, i will take it. Please it must be simply to use. It must set targets, for example, once it reaches $500 profit, it must
Here is a professional, detailed requirements specification draft for your MQL5 freelance order based on your prompt: Strategy Objective: Develop an automated Expert Advisor (EA) featuring a 1:3 Risk-to-Reward ratio optimized for a small starting budget. Core Trading Logic: Execute automatic Buy and Sell trades using high-probability entry signals. Target a strict 90% theoretical win-rate structure through
i want to fix my gold martingale bot MT5. RSI 14 ENTRY 30 BUY 70 SELL Lot 0.02 0.04 0.07 TP 150 for all SL 90 30 30 once total daily profit is 200$ stop trading stop trading once 2 consecutives total losses stop trading if spread exceeded 30 and between hour 15 & 17 PM Move SL to breakeven point once the profit exceeded 50 from from breakeven thanks
MarketMind Breakout Pro XAUUSD H1 — Donchian Breakout EA Project type: Personal EA development and backtesting Platform: MetaTrader 5 Instrument: XAUUSD Timeframe: H1 Strategy: Donchian Channel breakout with EMA 200 Project overview This project evaluates a Donchian breakout trading strategy for XAUUSD on the H1 timeframe. The system uses channel-based breakout conditions and an EMA 200 trend filter. Historical
The purpose of this order is ONLY to test and implement my H1 POI (Point of Interest) identification logic correctly. I am not requesting the complete EA at this stage. I will provide the exact rules for identifying the H1 POI after selecting the developer. The developer must convert those rules into clear, deterministic MQL5 logic. Requirements: Analyze H1 candles according to the rules I provide. Identify and mark
Title: Fully Automatic MT5 Trading Bot (Expert Advisor) with Risk Management I want a fully automated trading robot (Expert Advisor) for MetaTrader 5, written in MQL5. The bot must automatically analyse market data, identify trading opportunities, execute BUY and SELL orders, manage open positions, and close trades according to predefined rules without requiring manual confirmation for each trade. Requirements
Hello, I’m looking for an experienced developer to research, build, test, and install a fully automated MetaTrader 5 trading bot for gold, XAUUSD. My total development and installation budget is $300, including all agreed work and fees. My goal is to pass a $100,000 FTMO US Two-Step Standard evaluation and sustainably maintain the funded account. I need a day-trading strategy that can buy in bullish markets and sell
MT4 expert advisor
500+ USD
I have three indicators that operate independently. I want to combine them into one indicator with custom expert programming that automatically enters trades when a signal is generated by one of the indicators. I will pay for this service Thanks you
Existing EA: NEW_CORE_ORB_M5_v021 | MT5 | XAUUSD M5 Early-stage research prototype, not a new EA from scratch. Need an experienced MQL5 developer to audit, complete, repair, improve and test BOTH independent strategies equally: Opening Range Breakout (ORB) and Scalp. Keep code lightweight and preserve an untouched baseline. No unnecessary rewrite or complex filters. 1. ORB Strategy Verify opening-range construction
Информация о проекте
Бюджет
80+ USD
Сроки выполнения
от 1 до 10 дн.