명시
//+------------------------------------------------------------------+
//| Sistema_Cartão_Branca_EA.mq5 |
//| ROBÔ AUTOMÁTICO — VERSÃO MT5 |
//+------------------------------------------------------------------+
#property copyright "Sistema Cartão Branca - MT5"
#propriedade versão "1.00"
#propriedade estrita
// --- BIBLIOTECAS OBRIGATÓRIAS PARA NEGOCIAÇÃO NO MT5 ---
#include <Trade\Trade.mqh>
#include <Trade\PositionInfo.mqh>
#include <Trade\SymbolInfo.mqh>
Negociação CTrade;
Informações sobre a posição CPositionInfo;
CSymbolInfo informações_do_símbolo;
// --- CONFIGURAÇÕES ---
input double Lote_Fixo = 0.01;
entrada dupla Risco_Por_Operacao = 1,0;
input bool Usar_Lote_Auto = true;
input int Stop_Loss_Pips = 25;
input int Take_Profit_Pips = 50;
insira o valor Magic_Number = 77777;
entrada uint Slippage = 30;
input bool Permitir_Compra = true;
input bool Permitir_Venda = true;
input bool Fechar_Sinal_Oposto = true;
entrada int EMA_Curta = 20;
entrada int EMA_Media = 50;
input int EMA_Longa = 200;
input int RSI_Periodo = 14;
entrada int MACD_Fast = 12;
entrada int MACD_Slow = 26;
entrada int MACD_Sinal = 9;
input int RSI_Sobrevenda = 30;
input int RSI_Sobrecompra = 70;
// --- ALÇAS ---
int h_ema20, h_ema50, h_ema200, h_rsi, h_macd;
ponto duplo; dígitos inteiros;
//+------------------------------------------------------------------+
//| INICIALIZAÇÃO |
//+------------------------------------------------------------------+
int OnInit()
{
trade.SetExpertMagicNumber(Magic_Number);
trade.SetSlippageInPoints(Slippage);
symbol_info.Select(_Symbol);
digitos=symbol_info.Digits();
ponto=symbol_info.Point();
if(dígitos==3 || dígitos==5) ponto*=10;
// Cria lida com
h_ema20 =iMA(_Symbol,_Period,EMA_Curta,0,MODE_EMA,PRICE_CLOSE);
h_ema50 =iMA(_Symbol,_Period,EMA_Media,0,MODE_EMA,PRICE_CLOSE);
h_ema200=iMA(_Symbol,_Period,EMA_Longa,0,MODE_EMA,PRICE_CLOSE);
h_rsi =iRSI(_Symbol,_Period,RSI_Periodo,PRICE_CLOSE);
h_macd =iMACD(_Symbol,_Period,MACD_Fast,MACD_Slow,MACD_Sinal,PRICE_CLOSE);
se(h_ema20==INVALID_HANDLE || h_ema50==INVALID_HANDLE || h_ema200==INVALID_HANDLE ||
h_rsi==INVALID_HANDLE || h_macd==INVALID_HANDLE)
{ Print("Erro ao criar indicadores!"); retornar INIT_FAILED; }
retornar INIT_SUCCEEDED;
}
//+------------------------------------------------------------------+
//| FUNÇÃO PRINCIPAL |
//+------------------------------------------------------------------+
void OnTick()
{
// --- VERIFICA POSIÇÕES ABERTAS ---
bool tem_Compra=TemPosicao(POSITION_TYPE_BUY);
bool tem_Venda =TemPosicao(POSITION_TYPE_SELL);
// --- PEGA VALORES DOS INDICADORES ---
double e20=GetBufferValue(h_ema20,1);
double e50=GetBufferValue(h_ema50,1);
double e200=GetBufferValue(h_ema200,1);
double e20_ant=GetBufferValue(h_ema20,2);
double e50_ant=GetBufferValue(h_ema50,2);
double rsi=GetBufferValue(h_rsi,1);
double rsi_ant=GetBufferValue(h_rsi,2);
double macd_linha=GetBufferValue(h_macd,0,1);
double macd_sinal=GetBufferValue(h_macd,1,1);
double macd_linha_ant=GetBufferValue(h_macd,0,2);
double macd_sinal_ant=GetBufferValue(h_macd,1,2);
double fech=symbol_info.Close(1);
double ask=symbol_info.Ask();
double bid=symbol_info.Bid();
// --- SINAIS ---
bool SINAL_COMPRA=falso, SINAL_VENDA=falso;
// COMPRA
bool c1=(fech>e20 && fech>e50 && fech>e200);
bool c2=(e20>e50 && e20_ant<=e50_ant);
bool c3=(macd_linha>macd_sinal && macd_linha_ant<=macd_sinal_ant);
bool c4=(rsi>RSI_Sobrevenda && rsi_ant<=RSI_Sobrevenda && rsi<RSI_Sobrecompra);
SINAL_COMPRA=c1 && c2 && c3 && c4 && Permitir_Compra;
// VENDA
bool v1=(fech<e20 && fech<e50 && fech<e200);
bool v2=(e20<e50 && e20_ant>=e50_ant);
bool v3=(macd_linha<macd_sinal && macd_linha_ant>=macd_sinal_ant);
bool v4=(rsi<RSI_Sobrecompra && rsi_ant>=RSI_Sobrecompra && rsi>RSI_Sobrevenda);
SINAL_VENDA=v1 && v2 && v3 && v4 && Permitir_Venda;
// --- FECHA SE SINAL OPOSTO ---
se(Fechar_Sinal_Oposto)
{
if(SINAL_COMPRA && tem_Venda) FecharPosicao(POSITION_TYPE_SELL);
if(SINAL_VENDA && tem_Compra) FecharPosicao(POSITION_TYPE_BUY);
}
// --- EXECUTA OPERAÇÕES ---
if(SINAL_COMPRA && !tem_Compra)
{
lote duplo = LoteCalcular();
double sl=ask-Stop_Loss_Pips*ponto;
double tp=ask+Take_Profit_Pips*ponto;
if(trade.Buy(lote,_Symbol,ask,sl,tp,"Sistema CB - COMPRA"))
Print("✅ COMPRA ABERTA — Lote: ",lote);
senão Print("ERRO COMPRA: ",GetLastError());
}
se(SINAL_VENDA && !tem_Venda)
{
lote duplo = LoteCalcular();
double sl=bid+Stop_Loss_Pips*ponto;
double tp=bid-Take_Profit_Pips*ponto;
if(trade.Sell(lote,_Symbol,bid,sl,tp,"Sistema CB - VENDA"))
Print("🔴 VENDA ABERTA — Lote: ",lote);
senão Print("ERRO VENDA: ",GetLastError());
}
}
//+------------------------------------------------------------------+
//| FUNÇÕES AUXILIARES |
//+------------------------------------------------------------------+
double GetBufferValue(int handle, int shift, int buffer_idx=0)
{
double val[]; ArraySetAsSeries(val,true);
if(CopyBuffer(handle,buffer_idx,shift,1,val)<=0) return 0.0;
retornar val[0];
}
double CalcularLote()
{
if(!Usar_Lote_Auto) return NormalizeDouble(Lote_Fixo,2);
saldo duplo = AccountInfoDouble(ACCOUNT_BALANCE);
duplo risco=saldo*(Risco_Por_Operacao/100.0);
double lote=risco/(Stop_Loss_Pips*10.0); // 1 lote = ~$10/pip
lote=NormalizeDouble(lote,2);
se (lote < 0,01) lote = 0,01;
if(lote>symbol_info.LotsMax()) lote=symbol_info.LotsMax();
lote de retorno;
}
bool TemPosicao(ENUM_POSITION_TYPE tipo)
{
para(int i=0; i<PositionsTotal(); i++)
{
ulong ticket=PositionGetTicket(i);
se(PositionSelectByTicket(ticket))
{
se(PositionGetString(POSITION_SYMBOL)==_Symbol &&
PositionGetInteger(POSITION_MAGIC)==Magic_Number &&
Se PositionGetInteger(POSITION_TYPE)==tipo) retornar verdadeiro;
}
}
retornar falso;
}
void FecharPosicao(ENUM_POSITION_TYPE tipo)
{
for(int i=PositionsTotal()-1; i>=0; i--)
{
ulong ticket=PositionGetTicket(i);
se(PositionSelectByTicket(ticket))
{
se(PositionGetString(POSITION_SYMBOL)==_Symbol &&
PositionGetInteger(POSITION_MAGIC)==Magic_Number &&
PositionGetInteger(POSITION_TYPE)==tipo)
{
ulong pos_ticket=PositionGetInteger(POSITION_TICKET);
double lote=PositionGetDouble(POSITION_VOLUME);
negociação.Fechar(pos_ticket,lote);
Print("🔒 POSIÇÃO FECHADA");
}
}
}
}
void OnDeinit(const int reason)
{
if(h_ema20!=INVALID_HANDLE) IndicatorRelease(h_ema20);
if(h_ema50!=INVALID_HANDLE) IndicatorRelease(h_ema50);
if(h_ema200!=INVALID_HANDLE) IndicatorRelease(h_ema200);
if(h_rsi!=INVALID_HANDLE) IndicatorRelease(h_rsi);
if(h_macd!=INVALID_HANDLE) IndicatorRelease(h_macd);
}
응답함
1
등급
프로젝트
2
0%
중재
1
0%
/
0%
기한 초과
0
무료
2
등급
프로젝트
507
23%
중재
60
57%
/
25%
기한 초과
59
12%
작업중
3
등급
프로젝트
5
40%
중재
0
기한 초과
0
작업중
게재됨: 1 코드
4
등급
프로젝트
4
0%
중재
1
100%
/
0%
기한 초과
1
25%
무료
5
등급
프로젝트
1
100%
중재
0
기한 초과
0
무료
6
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
게재됨: 10 코드
7
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
8
등급
프로젝트
0
0%
중재
0
기한 초과
0
작업중
9
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
10
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
게재됨: 1 코드
11
등급
프로젝트
144
46%
중재
20
40%
/
20%
기한 초과
32
22%
무료
12
등급
프로젝트
0
0%
중재
0
기한 초과
0
로드됨
13
등급
프로젝트
18
44%
중재
2
50%
/
50%
기한 초과
0
무료
비슷한 주문
I am looking for an experienced MQL5 developer / algorithmic trader to create a complete MT5 Expert Advisor with strong risk management and verified historical backtesting. Main requirements Platform: MetaTrader 5 / MQL5. Market & Timeframe: The EA code should be able to operate on different Forex/CFD symbols and different timeframes. The developer may recommend the best symbol/timeframe combination based on testing
Flummox 0.1
30+ USD
//@version=5 strategy("Vol10 Triple Confluence M15", overlay=true, margin_long=100, margin_short=100) // === INPUTS === emaLen = input.int(200, "EMA Trend") rsiLen = input.int(14, "RSI Length") bbLen = input.int(14, "Bands Length") rsiOversold = input.float(25, "RSI Buy Zone") rsiOverbought = input.float(77.38, "RSI Sell Zone") // === INDICATORS === emaTrend = ta.ema(close, emaLen) ema1 = ta.ema(close, bbLen) ema2 =
I want a simple EA that will take trades based on candle formation and moving average. In a buy, the market should be above the moving average, and wait for the candle formation which i have shown them in the attachment. In a sell, the market should be below the moving average and wait for the candle formation. It must be easy to put stop loss, take profit. Pls make the robot to trade continuous trades as long as
Access and confidentiality restrictions: You will receive only a separately named copy of the Commander . Existing trading EAs, presets, account credentials, Telegram credentials and proprietary entry/exit code will not be shared. The Commander intelligence must be developed using: Defined signal/input interfaces Anonymized historical logs and replay data Mock EA signals and test harnesses Documented authority and
Liaqat
32+ USD
Title: Simple XAUUSD Trading Robot for MT5 Specification: 1. Platform: MetaTrader 5 2. Symbol: XAUUSD / Gold 3. Timeframe: M5 or M15 4. Strategy Logic: - BUY Entry: When RSI(14) is below 30 and candle closes green - SELL Entry: When RSI(14) is above 70 and candle closes red 5. Money Management: - Lot Size: 0.01 (user can change in settings) - Stop Loss: 500 points - Take Profit: 1000 points 6. Other
need an EA or indicator done , based on any strategy but with the following specific risk management parameters ; were i am able to do at least 2RR(standard reward-risk ratio for every trade) , fair win rate that is at leat 50% , EA should be able to generate at least 2 trades and above per week , favourable sharpe ratio . total drawdown of not more than 8% any given month and not over 3% any given day , would
Sharbat Khan
100+ USD
Looking for MQL5 Developer to debug my Gold Trading EA. Issues: - Error on compile - SL/TP not working correctly - Need to add Trail Stop feature Send me past work + Price + Delivery Time
Owethu FX Master EA
30+ USD
📈 Trend direction — EMA 20/50/200 🚀 Breakout entries 📊 RSI confirmation 💪 ADX market-strength filter 📏 ATR-based Stop Loss & Take Profit 💰 Automatic lot sizing based on risk % 🛡️ Daily-loss protection 🛡️ Maximum drawdown protection 🔄 Break-even management 📉 ATR trailing stop ⏰ Trading-session filter 💸 Spread filter 📅 Friday late-trading protection 🔢 Maximum open-position control
Mopati
30+ USD
need an MQL5 trading robot for Forex. It should open and close trades based on my strategy rules. Please include money management, stop loss, take profit, and lot size settings. The EA should be stable, easy to edit, and tested before delivery. I will share the exact entry and exit rules with the developer
MQL5 Forex Trading Robot Development
30 - 100 USD
I need an MQL5 trading robot for Forex. It should open and close trades based on my strategy rules. Please include money management, stop loss, take profit, and lot size settings. The EA should be stable, easy to edit, and tested before delivery. I will share the exact entry and exit rules with the developer
프로젝트 정보
예산
50+ USD
기한
로 365 일
고객
넣은 주문1
중재 수0