Termos de Referência
here's the code,
+------------------------------------------------------------------+
//| kama.mq4 |
//| Copyright 2022, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//| Heikin/Kaufman Strategy Expert Advisor |
//| By OpenAI (ChatGPT) |
//+------------------------------------------------------------------+
// Inputs
input int Length = 5;
input double Fastend = 2.5;
input int Slowend = 20;
input int test = 0;
input int sloma = 20;
// Indicator buffers
double nAMABuffer[];
double fmaBuffer[];
double smaBuffer[];
double ha_closeBuffer[];
double mha_closeBuffer[];
// External variables
extern double LotSize = 0.01; // Trading lot size
extern int StopLoss = 50; // Stop loss in pips
extern int TakeProfit = 100; // Take profit in pips
// Trading parameters
int ticket = -1;
int slippage = 3;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void OnCalculate(const int rates_total, const int prev_calculated, const datetime& time[], const double& open[], const double& high[], const double& low[], const double& close[], const long& tick_volume[], const long& volume[], const int& spread[])
{
int start = prev_calculated > 0 ? prev_calculated - 1 : 0;
ArrayResize(nAMABuffer, rates_total);
ArrayResize(fmaBuffer, rates_total);
ArrayResize(smaBuffer, rates_total);
ArrayResize(ha_closeBuffer, rates_total);
ArrayResize(mha_closeBuffer, rates_total);
double nfastend = 2 / (Fastend + 1);
double nslowend = 2 / (Slowend + 1);
for(int i = start; i < rates_total; i++)
{
double xPrice = (high[i] + low[i] + close[i]) / 3;
double xvnoise = MathAbs(xPrice - xPrice[test]);
double nsignal = MathAbs(xPrice - xPrice[i - Length]);
double nnoise = 0;
for(int j = i - Length + 1; j <= i; j++)
{
double xv = MathAbs((high[j] + low[j] + close[j]) / 3 - (high[j - 1] + low[j - 1] + close[j - 1]) / 3);
nnoise += xv;
}
double nefratio = nnoise != 0 ? nsignal / nnoise : 0;
double nsmooth = MathPow(nefratio * (nfastend - nslowend) + nslowend, 2);
nAMABuffer[i] = i > 0 ? nAMABuffer[i - 1] + nsmooth * (xPrice - nAMABuffer[i - 1]) : xPrice;
int ha_t = iCustom(NULL, 0, "Heikin Ashi", 0, i);
ha_closeBuffer[i] = iCustom(NULL, 0, "Heikin Ashi", 2, i, ha_t);
mha_closeBuffer[i] = iCustom(NULL, res1, "Heikin Ashi", 1, i, ha_t);
if(i >= test)
{
fmaBuffer[i] = iMAOnArray(mha_closeBuffer, rates_total, 1, 0, test, i);
}
if(i >= sloma)
{
smaBuffer[i] = iMAOnArray(ha_closeBuffer, rates_total, sloma, 0, MODE_EMA, i);
}
}
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int OnInit()
{
SetIndexBuffer(0, fmaBuffer);
SetIndexBuffer(1, smaBuffer);
SetIndexStyle(0, DRAW_LINE);
SetIndexStyle(1, DRAW_LINE);
SetIndexLabel(0, "MA");
SetIndexLabel(1, "SMA");
double emptyBufferArray[];
{
int totalBars = ArraySize(open); // Retrieve the size of the 'open' array
int start = prev_calculated > 0 ? prev_calculated - 1 : 0;
// Rest of your code...
for(int i = start; i < totalBars; i++)
{
// Processing for each bar
}
// Rest of your code...
}
SetIndexBuffer(2, emptyBufferArray, INDICATOR_DATA);
double emptyBufferArray2[];
ArrayResize(emptyBufferArray2, rates_total);
SetIndexBuffer(3, emptyBufferArray2, INDICATOR_DATA);
SetIndexStyle(2, DRAW_ARROW);
SetIndexStyle(3, DRAW_ARROW);
SetIndexArrow(2, SYMBOL_ARROWUP);
SetIndexArrow(3, SYMBOL_ARROWDOWN);
SetIndexEmptyValue(2, 0);
SetIndexEmptyValue(3, 0);
return INIT_SUCCEEDED;
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
ArrayFree(nAMABuffer);
ArrayFree(fmaBuffer);
ArrayFree(smaBuffer);
ArrayFree(ha_closeBuffer);
ArrayFree(mha_closeBuffer);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void OnTick()
{
if(ticket == -1 && OrdersTotal() == 0)
{
int rates_total = RatesTotal();
int start = MathMax(0, rates_total - 1 - 1000);
for(int i = start; i < rates_total; i++)
{
if(fmaBuffer[i - 1] > smaBuffer[i - 1] && fmaBuffer[i] < smaBuffer[i])
{
ObjectCreate("CrossUnder", OBJ_TRIANGLE, 0, Time[i], High[i], 0);
ObjectSet("CrossUnder", OBJPROP_STYLE, STYLE_SOLID);
ObjectSet("CrossUnder", OBJPROP_WIDTH, 1);
ObjectSet("CrossUnder", OBJPROP_BACK, Red);
ObjectSetText("CrossUnder", "S", 8, "Arial", Red);
}
}
if(fmaBuffer[rates_total - 2] > smaBuffer[rates_total - 2] && fmaBuffer[rates_total - 1] < smaBuffer[rates_total - 1])
{
ticket = OrderSend(Symbol(), OP_BUY, LotSize, Ask, slippage, Ask - StopLoss * Point, Ask + TakeProfit * Point);
if(ticket < 0)
Print("Error opening buy order:", GetLastError());
}
else
{
if(ticket == -1 && OrdersTotal() == 0)
{
int crossUnderBar = -1;
{
if(fmaBuffer[i - 1] > smaBuffer[i - 1] && fmaBuffer[i] < smaBuffer[i])
{
crossUnderBar = i;
}
}
if(crossUnderBar != -1)
{
double crossUnderPrice = Low[crossUnderBar];
ObjectCreate("CrossUnder", OBJ_TRIANGLE, 0, Time[crossUnderBar], crossUnderPrice, 0);
ObjectSet("CrossUnder", OBJPROP_STYLE, STYLE_SOLID);
ObjectSet("CrossUnder", OBJPROP_WIDTH, 1);
ObjectSet("CrossUnder", OBJPROP_BACK, Red);
ObjectSetText("CrossUnder", "S", 8, "Arial", Red);
}
// Rest of your code...
}
// Rest of your code...
}
{
ticket = OrderSend(Symbol(), OP_SELL, LotSize, Bid, slippage, Bid + StopLoss * Point, Bid - TakeProfit * Point);
if(ticket < 0)
Print("Error opening sell order:", GetLastError());
}
}
if(ticket >= 0)
{
if(OrderSelect(ticket, SELECT_BY_TICKET, MODE_TRADES))
{
if(OrderType() == OP_BUY && Bid - OrderStopLoss() > TakeProfit * Point)
{
if(OrderModify(ticket, OrderOpenPrice(), Bid - TakeProfit * Point, OrderTakeProfit(), 0, Green))
{
ticket = -1;
}
else
{
Print("Error modifying buy order:", GetLastError());
}
}
else
if(OrderType() == OP_SELL && OrderStopLoss() - Ask > TakeProfit * Point)
{
if(OrderModify(ticket, OrderOpenPrice(), Ask + TakeProfit * Point, OrderTakeProfit(), 0, Green))
{
ticket = -1;
}
else
{
Print("Error modifying sell order:", GetLastError());
}
}
}
else
{
Print("Error selecting order:", GetLastError());
ticket = -1;
}
}
}
//+------------------------------------------------------------------+
Respondido
1
Classificação
Projetos
972
47%
Arbitragem
32
38%
/
34%
Expirado
96
10%
Carregado
Publicou: 6 códigos
2
Classificação
Projetos
72
22%
Arbitragem
13
46%
/
15%
Expirado
5
7%
Livre
3
Classificação
Projetos
641
41%
Arbitragem
25
48%
/
36%
Expirado
46
7%
Trabalhando
4
Classificação
Projetos
10
50%
Arbitragem
6
17%
/
50%
Expirado
3
30%
Trabalhando
5
Classificação
Projetos
228
80%
Arbitragem
22
27%
/
50%
Expirado
11
5%
Livre
Publicou: 24 artigos, 1882 códigos
6
Classificação
Projetos
18
28%
Arbitragem
4
50%
/
50%
Expirado
1
6%
Livre
7
Classificação
Projetos
216
75%
Arbitragem
0
Expirado
0
Livre
8
Classificação
Projetos
102
23%
Arbitragem
12
25%
/
17%
Expirado
13
13%
Livre
9
Classificação
Projetos
195
42%
Arbitragem
12
8%
/
50%
Expirado
9
5%
Trabalhando
Publicou: 3 códigos
10
Classificação
Projetos
79
6%
Arbitragem
46
11%
/
54%
Expirado
7
9%
Trabalhando
Pedidos semelhantes
I’m looking for an experienced MQL5 developer to build TWO MT5 custom indicators that detect multi-condition M30 trade setups and send Telegram alerts before trade execution . This project requires strict close-based logic , multi-indicator buffer processing , and non-repainting behavior . HIGH-LEVEL REQUIREMENTS Indicators must evaluate signals from M30 only All conditions are checked only after candle close Logic
Ea make based on smc
40 - 50 USD
I want ea based on SMC concept,, i have good knowledge in smc,, if you have good knowledge then only message me we will discuss,, bos,, imbalance then take trade ,, with fixed sl and rr
hey developers its a fix 30$ job because it takes less than 5 minutes, i only need a source code for a progress bar and gauge bar, i want to impellent in my code. i have a for loop that i want to keep update it with these 2 objects. i mentioned the requirement in each photo please check it. its super easy and fast for someone who already done it, if you didn't do it before don't bother to request . job will be
1. The idea of the trading system is as follows : market entries are performed when MACD's main and signal lines intersect in the current trend direction . 2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is
Profitable MT5 EA wanted even martingale
30 - 45 USD
I’m looking for a highly profitable, robust EA for MT5. Targets 3% profit/month with max 1% drawdown Trades 1 signal pair 1+ year stable backtesting "Retard proof" execution Price isn't an issue. Must provide demo for testing + proof of performance Requirements: Demo version for evaluation Source code (.mq5) Serious developers only Only serious developer
Tôi muốn EA siêu lợi nhuận, giá cả không thành vấn đề, chỉ cần bạn có thể chứng minh được, và gửi tôi bản demo để tôi kiểm tra bạn hãy chứng minh bản thân mình trước. EA cần backtest 1 năm hoạt động ổn định
EA giao dịch theo trend
30 - 50 USD
Tôi cần một EA giao dịch theo suppertrend MT5 bao gồm các tính năng sau: 1. THÔNG SỐ NHẬN DIỆN (IDENT) MagicNumber: Lấy 6 số cuối cùng của số giao dịch tài khoản. Comment: Ghi tùy chỉnh hoặc cố định nội dung (Ví dụ: GTS_PRO_V1). 2. CHIẾN THUẬT VÀO LỆNH (LOGIC STOP ẢO) Không vào trực tiếp, mà đặt Limit/stop. EA sử dụng lệnh Virtualout (Pending Hide): Điều kiện 1 (Lọc xu hướng): SuperTrend HTF (H1/H4) phải đồng nhất
Im looking for an EA with Code. An EA that can capture big impulsive move on any instrument. Open trades only with multiple confirmation and a very high probability setup intraday or swing trading That can do top down/multi time frame analysis like D1 H4 H1 and then implement the trade on shorter time frame to catch the moves from the start. As i want to catch only the impulsive moves so there must be a Volume
MT5 XAUUSD Expert Advisor – Copy Behavior Bot
300 - 750 USD
I am looking for an experienced MT5 Expert Advisor developer. Goal: Create a custom MT5 EA that replicates the behavior of a profitable copy trading strategy (behavior-based, not code copying). Specifications: - Symbol: XAUUSD only - Max 1 trade at a time - Fixed risk per trade: 1% - Trades per week: 2–4 - Trading days: Monday to Thursday only - No trading during high-impact USD news (news filter required) - No
Up down trader
40+ USD
Create an expert advisor for meta trader 5 which trades buy and sell alternatively. First trade buy, next trade sell. For example. If a trade of 0.01 lot is placed on a buy and the trade is won, then the next trade is 0.01 on a sell. If the sell trade is won, then the next trade is a buy at 0.01. If there is a loss, then the lot sizes increase by a specified value. eg. 0.025. If there is yet another loss, then the
Informações sobre o projeto
Orçamento
40+ USD