Specification
#property copyright "Copyright 2024, Trade Smart Fx Tools"
#property link "tradesmartfxtools.online"
#property version "1.00"
#property strict
// Global Varibles
int MAGIC_NUMBER = 0907200406;
string labelName = "tradesmartfxtools.online";
string updatedLabelName = "updated_version_label";
string updatedLabelText = "Updated version available at tradesmartfxtools.online";
string labelText = "EA by tradesmartfxtools.online";
string buyProfitLabelName = "OverallBuyProfitLabel";
string sellProfitLabelName = "OverallSellProfitLabel";
int labelFontSize = 16;
int updatedLabelFontSize = 12;
color labelColor = Yellow;
color profitLabelColor = White;
color lossLabelColor = White;
int spaceFromBottom = 50;
color updatedLabelColor = White;
int updatedSpaceFromBottom = 20;
input int fastMAPeriod = 10; // Period for fast MA
input int slowMAPeriod = 25; // Period for slow MA
//+------------------------------------------------------------------+
//| Labels |
//+------------------------------------------------------------------+
void createOrUpdateLabels(double buyProfit, double sellProfit)
{
if(ObjectFind(0, labelName) == -1)
{
ObjectCreate(0, labelName, OBJ_LABEL, 0, 0, 0);
}
ObjectSetInteger(0, labelName, OBJPROP_CORNER, CORNER_LEFT_LOWER);
ObjectSetInteger(0, labelName, OBJPROP_XDISTANCE, 10);
ObjectSetInteger(0, labelName, OBJPROP_YDISTANCE, spaceFromBottom);
ObjectSetInteger(0, labelName, OBJPROP_COLOR, labelColor);
ObjectSetInteger(0, labelName, OBJPROP_FONTSIZE, labelFontSize);
ObjectSetInteger(0, labelName, OBJPROP_SELECTABLE, false);
ObjectSetInteger(0, labelName, OBJPROP_SELECTED, false);
ObjectSetString(0, labelName, OBJPROP_TEXT, labelText);
if(ObjectFind(0, updatedLabelName) == -1)
{
ObjectCreate(0, updatedLabelName, OBJ_LABEL, 0, 0, 0);
}
ObjectSetInteger(0, updatedLabelName, OBJPROP_CORNER, CORNER_LEFT_LOWER);
ObjectSetInteger(0, updatedLabelName, OBJPROP_XDISTANCE, 10);
ObjectSetInteger(0, updatedLabelName, OBJPROP_YDISTANCE, updatedSpaceFromBottom);
ObjectSetInteger(0, updatedLabelName, OBJPROP_COLOR, updatedLabelColor);
ObjectSetInteger(0, updatedLabelName, OBJPROP_FONTSIZE, updatedLabelFontSize);
ObjectSetString(0, updatedLabelName, OBJPROP_TEXT, updatedLabelText);
// Create or update the buy profit label
string buyProfitText = "Overall Buy Profit: " + DoubleToString(buyProfit, 2);
if(ObjectFind(0, buyProfitLabelName) == -1)
{
ObjectCreate(0, buyProfitLabelName, OBJ_LABEL, 0, 0, 0);
}
ObjectSetInteger(0, buyProfitLabelName, OBJPROP_CORNER, CORNER_LEFT_UPPER);
ObjectSetInteger(0, buyProfitLabelName, OBJPROP_XDISTANCE, 20);
ObjectSetInteger(0, buyProfitLabelName, OBJPROP_YDISTANCE, spaceFromBottom - 6); // Adjusted Y position
ObjectSetInteger(0, buyProfitLabelName, OBJPROP_COLOR, profitLabelColor);
ObjectSetInteger(0, buyProfitLabelName, OBJPROP_FONTSIZE, labelFontSize);
ObjectSetInteger(0, buyProfitLabelName, OBJPROP_SELECTABLE, false);
ObjectSetInteger(0, buyProfitLabelName, OBJPROP_SELECTED, false);
ObjectSetString(0, buyProfitLabelName, OBJPROP_TEXT, buyProfitText);
// Create or update the sell profit label
string sellProfitText = "Overall Sell Profit: " + DoubleToString(sellProfit, 2);
if(ObjectFind(0, sellProfitLabelName) == -1)
{
ObjectCreate(0, sellProfitLabelName, OBJ_LABEL, 0, 0, 0);
}
ObjectSetInteger(0, sellProfitLabelName, OBJPROP_CORNER, CORNER_LEFT_UPPER);
ObjectSetInteger(0, sellProfitLabelName, OBJPROP_XDISTANCE, 20);
ObjectSetInteger(0, sellProfitLabelName, OBJPROP_YDISTANCE, spaceFromBottom - 36); // Adjusted Y position
ObjectSetInteger(0, sellProfitLabelName, OBJPROP_COLOR, lossLabelColor);
ObjectSetInteger(0, sellProfitLabelName, OBJPROP_FONTSIZE, labelFontSize);
ObjectSetInteger(0, sellProfitLabelName, OBJPROP_SELECTABLE, false);
ObjectSetInteger(0, sellProfitLabelName, OBJPROP_SELECTED, false);
ObjectSetString(0, sellProfitLabelName, OBJPROP_TEXT, sellProfitText);
}
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
createOrUpdateLabels(0.0, 0.0); // Initialize labels with 0 profit and trade counts
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
// Delete the main EA label
if(ObjectFind(0, labelName) != -1)
ObjectDelete(0, labelName);
// Delete the updated version label
if(ObjectFind(0, updatedLabelName) != -1)
ObjectDelete(0, updatedLabelName);
// Delete the buy profit label
if(ObjectFind(0, buyProfitLabelName) != -1)
ObjectDelete(0, buyProfitLabelName);
// Delete the sell profit label
if(ObjectFind(0, sellProfitLabelName) != -1)
ObjectDelete(0, sellProfitLabelName);
Print("All labels have been removed.");
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
double totalBuyProfit = 0.0;
double totalSellProfit = 0.0;
// Calculate total buy and sell profits and count trades
for(int i = OrdersTotal() - 1; i >= 0; i--)
{
if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES) && OrderSymbol() == _Symbol)
{
if(OrderType() == OP_BUY)
{
totalBuyProfit += OrderProfit();
}
else
if(OrderType() == OP_SELL)
{
totalSellProfit += OrderProfit();
}
}
}
createOrUpdateLabels(totalBuyProfit, totalSellProfit);
CloseProfitableTradesOnMACrossover();
}
//+------------------------------------------------------------------+
//| Close Profitable Trades On MA Crossover |
//+------------------------------------------------------------------+
void CloseProfitableTradesOnMACrossover()
{
double fastMA = iMA(NULL, 0, fastMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
double slowMA = iMA(NULL, 0, slowMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
double fastMA_prev = iMA(NULL, 0, fastMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 1);
double slowMA_prev = iMA(NULL, 0, slowMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 1);
// Check for crossover
bool bullishCrossover = fastMA_prev < slowMA_prev && fastMA > slowMA;
bool bearishCrossover = fastMA_prev > slowMA_prev && fastMA < slowMA;
if(bullishCrossover || bearishCrossover)
{
// Loop through all open trades
int totalOrders = OrdersTotal();
if(totalOrders == 0)
{
Print("No open orders found.");
return;
}
for(int i = totalOrders - 1; i >= 0; i--)
{
if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
{
// Check if the trade is profitable
double profit = OrderProfit();
if(profit >= 0)
{
// Attempt to close the order
bool closed = false;
if(OrderType() == OP_BUY)
{
closed = OrderClose(OrderTicket(), OrderLots(), Bid, 2, clrRed);
if(closed)
Print("Closed profitable Buy order ", OrderTicket(), " with profit: ", profit);
else
Print("Error closing Buy order ", OrderTicket(), ": Error code ", GetLastError());
}
else
if(OrderType() == OP_SELL)
{
closed = OrderClose(OrderTicket(), OrderLots(), Ask, 2, clrRed);
if(closed)
Print("Closed profitable Sell order ", OrderTicket(), " with profit: ", profit);
else
Print("Error closing Sell order ", OrderTicket(), ": Error code ", GetLastError());
}
}
else
{
Print("Order ", OrderTicket(), " is not profitable, skipping.");
}
}
else
{
Print("Error selecting order ", i, ": Error code ", GetLastError());
}
}
}
}
//+------------------------------------------------------------------+
Responded
1
Rating
Projects
298
28%
Arbitration
33
24%
/
61%
Overdue
9
3%
Loaded
2
Rating
Projects
188
57%
Arbitration
10
80%
/
0%
Overdue
0
Free
Published: 1 code
3
Rating
Projects
570
37%
Arbitration
106
39%
/
33%
Overdue
17
3%
Free
4
Rating
Projects
2
0%
Arbitration
1
0%
/
0%
Overdue
0
Free
5
Rating
Projects
396
27%
Arbitration
38
39%
/
50%
Overdue
1
0%
Free
6
Rating
Projects
619
33%
Arbitration
35
37%
/
49%
Overdue
11
2%
Busy
7
Rating
Projects
253
30%
Arbitration
0
Overdue
3
1%
Free
Published: 2 codes
8
Rating
Projects
469
39%
Arbitration
102
40%
/
24%
Overdue
77
16%
Loaded
Published: 2 codes
Similar orders
Evil trader
30+ USD
Trading bot using resistance for is strategy with no taking to much of risk on the lots size making it the best trading tp for me to use and also no when to trade and when not to
I have an expert advisor (MQL5) that works professionally on all timeframes. This is a test on a 5-minute timeframe, from $10,000 to $614,195.70, from the beginning of 2025 to the beginning of 2026 on the Dow Jones
1441
30+ USD
444fwefwefw jlklklklklklklklklkeaNRFNEWM EWQJEWQIOREJEWQKLFDNMKLFD.MDW/LFDK.MEWFDLK;EMFWEKLMFWELKFREWNMFNDM,VSDV/S.DAFLMWEO;RWEJRPWOEJWE09PUJR9O EJ WKEWMK F FMKDSMKF SDEWJWJ [Q\ /QLDKNQNDQPIUHQD.Q,DMASDOAIFDA,M DFA AAS,KFDJNLOFD NOIFDJNFDAS NKNLOASJOFIKJD ASOIJFISFNKSNF SFSNOIWWQJ-0I[PKEM DAI-0IK-0DQMDQ NDACAI-0 I- EKQ;LDN0912KDMMOIKM Cdjoiasd f09wilf d qkdfokawsd-09fdkdadsomfasdlkkf-0 q[pkkd-0]q2kda\fld
MT5 EA required with SMC strategy
40 - 80 USD
Signal Logic - Swing points detected correctly (Fractals or N-bar) - BOS triggers only on bar close beyond swing level (+ optional min break distance) - FVG zones detected correctly (3-candle gap) and stored with clear boundaries - FVG invalidation works as configured (full fill / partial fill / timeout) Entry & Execution - Entry only after BOS (if enabled) and on return to active FVG zone - Bar-close confirmation
LOOKING FOR AN EA WITH HIGH PERFORMANCE
30 - 45 USD
Hi, I’m searching for a developer who already has a high‑performance Gold EA that can beat the results shown in my screenshot. If you have such an EA, please reply with: - A brief description of how it works (grid, scalping, SMC, etc.) - Backtest results and the set files you used - Whether you’re willing to make minor tweaks so I can use it as my own If the performance looks good, we can discuss adjustments and next
Requirements Specification for the development of the Expert Advisor, in the latest version of MetaTrader 5 including the source code. 1. The idea of the trading system is as follows: market entries are performed when a new renko box is created in the current trend direction using an indicator from Trading view. Indicator Name: Renko Candles Overlay Published By: LonesomeTheBlue Code Available In: Pine Script which
Modification of exit method for existing expert
30 - 100 USD
Hello I would like to modify the exit method of the trade for current expert advisor which include martingale trading. basically adjusting the position size and closing the trade. additional details will be provided in the next step
Convert Pinescript indicator to mql5 code
30 - 100 USD
I have 3 pine script of trading view and want to convert it into mql5 code. basically it has 2 script and in that one script I use 2 different ways. so here is 3 stratagy that can work in one code mql5 and I can use in mt5
I need a MetaTrader 5 Expert Advisor with full MQ5 source code. Platform: - MT5 only - Full MQ5 source code mandatory - Must work with Exness broker (symbol suffix like XAUUSDm) Strategy: - Trend-based trading only - NO grid - NO martingale - NO averaging - Fixed Stop Loss & Take Profit - Max 1–2 trades at a time Risk Management: - Daily profit target (stop trading after hit) - Daily loss limit - Maximum drawdown
CẦN TÌM NGƯỜI VIẾT EA NHƯ HÌNH
500+ USD
cần người tạo EA y thay đổi hình ảnh gửi đầy đủ tính năng như hình giá cả có thể tăng thêm khối lượng mong muốn viết giống hình không khác ROBOT HƠI NHIỀU TÍNH NĂNG MỌI NGƯỜI CÓ THỂ ĐƯA GIÁ THAM KHẢO
Project information
Budget
40+ USD