指定

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
开发者 1
等级
(76)
项目
137
40%
仲裁
2
100% / 0%
逾期
4
3%
工作中
2
开发者 2
等级
(6)
项目
6
0%
仲裁
0
逾期
1
17%
繁忙
3
开发者 3
等级
(277)
项目
496
35%
仲裁
63
33% / 35%
逾期
178
36%
已载入
4
开发者 4
等级
(270)
项目
548
49%
仲裁
55
40% / 36%
逾期
226
41%
工作中
5
开发者 5
等级
(63)
项目
143
45%
仲裁
19
42% / 16%
逾期
32
22%
空闲
6
开发者 6
等级
项目
0
0%
仲裁
0
逾期
0
工作中
7
开发者 7
等级
(43)
项目
89
13%
仲裁
33
27% / 58%
逾期
36
40%
工作中
相似订单
Техническое задание описывает необходимые функциональные изменения и дополнения существующего экспертного советника (EA), работающего на основе дивергенций (RSI/MACD) и использующего 8 различных вариантов открытия позиций. Цель задания - расширить функциональность советника таким образом, чтобы он мог: 1. Использовать внешний индикатор “All-in-One Candlestick Pattern Scanner” через функцию bridge для получения
Session Block Volatility D=TickVolumesInBlock/t(hrs(3)) ; in session block we will add tick volumes for the entire block r=D/2 ; this is radius of our absolute diameter VB=π.r^2.h/t(mins(180)) ; this is our equation for VB in each block, here we will divide by mins(180, constant) h=height(high-low %change in session block as is) then we will find Avg VB in time series of entire blocks in sessions(H1,H2,H3,H4) then
I would like to have a proof of concept application that allows me to take prices from MT5 into my own application, to enter orders from my application to my broker via the MT5 connection and to see my filled orders, working orders and P/L in my own application
I am looking for an experienced MQL4 developer to create a rebate farming Expert Advisor (EA) designed to consistently generate a minimum of 2 lots per day on a $500 account with low drawdown and safe logic . The primary goal is volume generation , not profitability — the EA should be optimized to maximize trade count or lot turnover for rebate/cashback purposes, while maintaining account safety. 🧠 Requirements
Mt5 trading bot 30+ USD
I would like to order a fully automated scalping EA suitable for Forex. It should open and close trades automatically (up to 20 trades per day) with low risk. It should execute trades Monday through Friday. My broker is Pepperstone Groupe Limited Razor account type and connected to Metatrader 5. I will first try the EA in the demo account for a week before using it in the live account
Looking for an Experienced Pine Script Coder I'm searching for a skilled Pine Script developer to refine and enhance an existing TradingView script which I coded. The goal is to improve structure, readability, and functionality. Tasks: ✔ Clean and optimize existing Pine Script ✔ Improve code structure for better visualization ✔ Re-code where necessary while maintaining accuracy ✔ List all indicators in a dedicated
Hi, I was trying was try to make a ninjatrade statregy and I ran to issues if you take a look at the files, the newstrategy file is connect with the 22062 image - for that strategy I got the ninjascript to desplay delta in the output. My issues is that I bough a 3r party software for orderflow, and I wanted to use stopping volume in the ninjatrade strategy buy I don't know how to access it, I don't know how to write
Custom strategy 30+ USD
I run a trading discord and I have a plan for something related to a script/signal but I have no idea how realistic it is as im not very educated on anything in that realm. If I ran and idea by you , could you anyone me if its a service you can provide? and im wondering if pieces of that strategy can be turned into discord channel alerts rather than a tradingview signal if that makes sense
Create a bot that reads trading signals from Telegram. - Ensure the bot can execute trades automatically on the MT5 platform. I need something that will be robust and that has been back tested for success. The Bot will need to execute immediately upon reading the telegram signals and execute moving SLs to breakeven and closing trades as well depending on what messages have been sent. A signal to buy or sell gold
- Develop and refine high-performance Forex indicators using advanced technical analysis and programming skills - Collaborate with our trading team to identify market trends and create strategies - Backtest and optimize indicators to ensure exceptional performance - Stay up-to-date with market developments and adapt indicators accordingly - Strong programming skills (e.g., MQL, Python, C++) - Experience with Forex

项目信息

预算
80+ USD
开发人员
72 USD
截止日期
 1  10 天