Spezifikation
//+------------------------------------------------------------------+
//| Expert Advisor Inside Bar com ADX para MetaTrader |
//+------------------------------------------------------------------+
#property strict
// Definindo as variáveis
input int ADXPeriod = 14; // Período do ADX
input int ADXThreshold = 25; // Limite do ADX para confirmação da tendência
input double RiskRewardRatio = 2; // Risco/Recompensa (1:2)
double LotSize = 0.1; // Tamanho da Lote
// Função para verificar Inside Bar e executar a ordem
void OnTick()
{
// Calculando o valor do ADX
double ADXValue = iADX(NULL, 0, ADXPeriod, PRICE_CLOSE, 0);
// Verificando Inside Bar (vela atual dentro da vela anterior)
if (High[1] < High[2] && Low[1] > Low[2])
{
// Confirmando a tendência com o ADX
if (ADXValue > ADXThreshold)
{
// Definindo o Stop Loss e Take Profit com base na mínima/máxima do Inside Bar
double InsideBarHigh = High[1];
double InsideBarLow = Low[1];
double InsideBarRange = InsideBarHigh - InsideBarLow;
// Calculando Stop Loss e Take Profit
double StopLoss, TakeProfit;
// Condição de compra (rompimento da máxima do Inside Bar)
if (Close[1] > InsideBarHigh)
{
StopLoss = InsideBarLow; // SL na mínima do Inside Bar
TakeProfit = InsideBarHigh + RiskRewardRatio * InsideBarRange; // TP com risco/recompensa 1:2
// Abrindo a ordem de compra
OpenBuyOrder(StopLoss, TakeProfit);
}
// Condição de venda (rompimento da mínima do Inside Bar)
if (Close[1] < InsideBarLow)
{
StopLoss = InsideBarHigh; // SL na máxima do Inside Bar
TakeProfit = InsideBarLow - RiskRewardRatio * InsideBarRange; // TP com risco/recompensa 1:2
// Abrindo a ordem de venda
OpenSellOrder(StopLoss, TakeProfit);
}
}
}
}
// Função para abrir uma ordem de compra
void OpenBuyOrder(double StopLoss, double TakeProfit)
{
// Calculando o preço de abertura da ordem de compra
double AskPrice = Ask;
// Abrindo a ordem de compra
int ticket = OrderSend(Symbol(), OP_BUY, LotSize, AskPrice, 3, StopLoss, TakeProfit, "Inside Bar Buy", 0, 0, clrGreen);
if (ticket < 0)
{
Print("Erro ao abrir ordem de compra: ", GetLastError());
}
}
// Função para abrir uma ordem de venda
void OpenSellOrder(double StopLoss, double TakeProfit)
{
// Calculando o preço de abertura da ordem de venda
double BidPrice = Bid;
// Abrindo a ordem de venda
int ticket = OrderSend(Symbol(), OP_SELL, LotSize, BidPrice, 3, StopLoss, TakeProfit, "Inside Bar Sell", 0, 0, clrRed);
if (ticket < 0)
{
Print("Erro ao abrir ordem de venda: ", GetLastError());
}
}
Bewerbungen
1
Bewertung
Projekte
232
32%
Schlichtung
18
39%
/
33%
Frist nicht eingehalten
1
0%
Arbeitet
2
Bewertung
Projekte
618
33%
Schlichtung
35
37%
/
49%
Frist nicht eingehalten
10
2%
Überlastet
3
Bewertung
Projekte
469
39%
Schlichtung
102
40%
/
24%
Frist nicht eingehalten
77
16%
Beschäftigt
Veröffentlicht: 2 Beispiele
4
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
5
Bewertung
Projekte
8
0%
Schlichtung
4
0%
/
100%
Frist nicht eingehalten
3
38%
Frei
6
Bewertung
Projekte
49
8%
Schlichtung
0
Frist nicht eingehalten
0
Frei
7
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
8
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
9
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
10
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
11
Bewertung
Projekte
3
0%
Schlichtung
1
0%
/
100%
Frist nicht eingehalten
0
Frei
12
Bewertung
Projekte
945
47%
Schlichtung
309
58%
/
27%
Frist nicht eingehalten
125
13%
Frei
Ähnliche Aufträge
Gold MetaLockDay EA
30+ USD
//+------------------------------------------------------------------+ //| Gold MetaLockDay EA (MT5) | //| Meta líquida diária com MIX de entradas (XAUUSD) | //+------------------------------------------------------------------+ #property strict #include <Trade/Trade.mqh> CTrade trade; //======================== INPUTS ========================// input string InpSymbol = ""; //
Preciso de um desenvolvedor com experiência comprovada em MQL5 , especificamente em automação de alertas do MetaTrader 5 com envio automático de mensagens e prints para canal do Telegram . O projeto não é do zero . Já possuo: Código do indicador / lógica em MQL5 Biblioteca de integração com Telegram (API já pronta) O trabalho consiste em ajustar / implementar um Expert Advisor para que, quando um alerta específico
Projektdetails
Budget
40+ USD