İş Gereklilikleri
//+------------------------------------------------------------------+
//| XAUUSD FULL AUTO SAFE BOT MT5 |
//| Converted from Pine Script v5 |
//+------------------------------------------------------------------+
#property copyright "Converted by ChatGPT"
#property version "1.00"
#property strict
#include <Trade/Trade.mqh>
CTrade trade;
// === INPUT ===
input double LotPercent = 1.0; // % Equity
input int EMAFast = 50;
input int EMASlow = 200;
input int RSILength = 14;
input int ATRLength = 14;
input double RiskReward = 2.0;
// === INDICATOR HANDLES ===
int emaFastHandle, emaSlowHandle, rsiHandle, atrHandle;
//+------------------------------------------------------------------+
int OnInit()
{
emaFastHandle = iMA(_Symbol, _Period, EMAFast, 0, MODE_EMA, PRICE_CLOSE);
emaSlowHandle = iMA(_Symbol, _Period, EMASlow, 0, MODE_EMA, PRICE_CLOSE);
rsiHandle = iRSI(_Symbol, _Period, RSILength, PRICE_CLOSE);
atrHandle = iATR(_Symbol, _Period, ATRLength);
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
void OnTick()
{
static datetime lastBarTime = 0;
datetime currentBarTime = iTime(_Symbol, _Period, 0);
// === Execute only on new candle ===
if(currentBarTime == lastBarTime) return;
lastBarTime = currentBarTime;
if(PositionSelect(_Symbol)) return; // 1 posisi saja
double emaFast[2], emaSlow[2], rsi[2], atr[1];
CopyBuffer(emaFastHandle, 0, 0, 2, emaFast);
CopyBuffer(emaSlowHandle, 0, 0, 2, emaSlow);
CopyBuffer(rsiHandle, 0, 0, 2, rsi);
CopyBuffer(atrHandle, 0, 0, 1, atr);
double closePrice = iClose(_Symbol, _Period, 1);
bool bullTrend = emaFast[1] > emaSlow[1];
bool bearTrend = emaFast[1] < emaSlow[1];
bool buySignal =
bullTrend &&
closePrice > emaSlow[1] &&
rsi[1] > 45 && rsi[0] <= 45;
bool sellSignal =
bearTrend &&
closePrice < emaSlow[1] &&
rsi[1] < 55 && rsi[0] >= 55;
double lot = NormalizeDouble(AccountInfoDouble(ACCOUNT_EQUITY)
* LotPercent / 100 / 1000, 2);
if(buySignal)
{
double sl = closePrice - atr[0];
double tp = closePrice + atr[0] * RiskReward;
trade.Buy(lot, _Symbol, 0, sl, tp, "BUY XAU SAFE");
}
if(sellSignal)
{
double sl = closePrice + atr[0];
double tp = closePrice - atr[0] * RiskReward;
trade.Sell(lot, _Symbol, 0, sl, tp, "SELL XAU SAFE");
}
}
//+------------------------------------------------------------------+
Yanıtlandı
1
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
2
Derecelendirme
Projeler
0
0%
Arabuluculuk
1
0%
/
100%
Süresi dolmuş
0
Serbest
3
Derecelendirme
Projeler
186
41%
Arabuluculuk
24
58%
/
21%
Süresi dolmuş
13
7%
Serbest
4
Derecelendirme
Projeler
8
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
5
Derecelendirme
Projeler
394
53%
Arabuluculuk
20
55%
/
15%
Süresi dolmuş
28
7%
Yüklendi
6
Derecelendirme
Projeler
38
24%
Arabuluculuk
14
0%
/
93%
Süresi dolmuş
4
11%
Serbest
7
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
8
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
9
Derecelendirme
Projeler
253
30%
Arabuluculuk
0
Süresi dolmuş
3
1%
Serbest
Yayınlandı: 2 kod
Benzer siparişler
SpikeEnginePro EA
30+ USD
// Add this to your EA after ExportState() function void SendToBase44(const string state, const string dir, double entry, double sl, double tp) { string url = " https://preview-sandbox--ee0a32a725b788974de435e8cef40b7a.base44.app/api/functions/receiveEAState "; string headers = "Content-Type: application/json\r\n"; string json = "{" "\"symbol\":\""+_Symbol+"\","
1.Sinyal Perdagangan : Sinyal beli: garis MACD utama memotong garis sinyal ke atas (macd_current>signal_current && macd_previous<signal_previous). Sinyal jual: garis MACD utama memotong garis sinyal ke bawah (macd_current<signal_current && macd_previous>signal_previous). Gambar di bawah menunjukkan kasus beli dan jual. 2. Posisi ditutup pada sinyal yang berlawanan: Posisi beli ditutup pada sinyal jual, dan posisi
EA grid hunter
30 - 200 USD
1. Platform & Environment Platform: MetaTrader 5 (MT5 ONLY) Language: MQL5 Account type: ECN / Netting or Hedging Designed for broker rebate/commission return programs No DLLs, no external dependencies 2. Strategy Overview The EA is a high-frequency scalping Expert Advisor focused on maximizing the number of trades with minimal price movement, where the main source of profitability is broker rebate rather than market
Proje bilgisi
Bütçe
100+ USD
Müşteri
Verilmiş siparişler1
Arabuluculuk sayısı0