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
311
28%
Arbitration
33
27%
/
64%
Overdue
10
3%
Working
2
Rating
Projects
191
58%
Arbitration
10
80%
/
0%
Overdue
0
Working
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
400
27%
Arbitration
39
41%
/
49%
Overdue
1
0%
Free
6
Rating
Projects
631
33%
Arbitration
38
39%
/
50%
Overdue
11
2%
Working
7
Rating
Projects
256
30%
Arbitration
0
Overdue
3
1%
Free
Published: 2 codes
8
Rating
Projects
472
40%
Arbitration
103
40%
/
23%
Overdue
78
17%
Busy
Published: 2 codes
Similar orders
Project: Telegram Signal to MT5 EA Bridge
30 - 100 USD
I am looking for a developer who can create a bot that automatically reads trading signals from a Telegram channel and sends them to an EA, which will then open trades based on the received instructions. Example workflow: When the signal provider posts something like: “Buy now 5108” The bot should send this to the EA and trigger an entry within a defined zone (e.g., 5108–5103 ). The EA should then: • Place layered
I would like to create a robot with the smart money concepts, that integrates order block,FVG,supply & demand ,read the market structure,liquidity and also trade with the session and also after a liquidity sweep a market structure is needed to verify the reversal and a retracement to the order block and sometimes fair value Gap
Joker poverty scalper
40 - 100 USD
the joker poverty scalper is the power full robort it can analyse in just 1 minutes it is good for beginner traders you can even make 5000$ in just an week or two.. the best thing to do is to buy joker and make life easy with your own copy of joker .in order to be rich you need the joker to help you with your success in life even in future THE JOKER POVERT SCALPER
Minor Update in EA
30 - 50 USD
I Have an EA, which reads the files from common folder and takes trades. Kindly note: My coder is from Iran and I am unable to reach him for the last few days and that’s why I am looking for someone who can help me out. 1. File handling issue when invalid lot size WWhen EA couldn’t take trades due to invalid lot size, it prints logs continuously. You just need to print the log once and send the file to the
I’m looking to acquire an existing, profitable Expert Advisor (EA) with full source code to add to our client investment portfolio. To be clear, this is not a request to develop or design a new strategy. If you already have an EA that is proven, consistent, and production-ready, I’m open to reviewing it immediately. Please apply only if you meet all the requirements below. Submissions without a proper introduction or
MT5 EA Development Project
30 - 50 USD
Project Scope Development of a fully automated, conservative, institutional-style Expert Advisor for MT5 trading XAUUSD, designed with strict capital preservation and mathematically structured risk management. • Symbol input will be fully configurable to support broker-specific suffixes/prefixes (example: XAUUSD.a, XAUUSDm) and automatically adapt to different digit formats. Core Strategy Logic • Higher-timeframe
Very Simple Trade Manager EA
30+ USD
trade manager EA to be installed on single chart at my trade account. should have 3 variables (Break even value at USD , Trail start value in USD and trail Gap value in USD). means if i set breakeven at 5 USD , Trail start at 6 USD and trail gap 1 USD (for example), then this EA will set the breakeven as soon as trade on any open trades at this account reaches 5 USD profit , later once profit is 6 USD , trail SL
Pocket option bot-telegram
30 - 130 USD
Pocket Option Auto-Trading Bot with Telegram Integration I want a bot that reads signals from my Telegram channel and auto-executes those trades on my Pocket Option account. 1. Direction mode open BUY (CALL) and SELL (PUT) signal_only: open only the direction specified by the signal (CALL or PUT). 2. Respect signal direction When direction_mode = signal_only, a CALL signal opens a CALL; a PUT signal opens a PUT. 3
MODIFICAR EA DE BREAKOUT
30 - 35 USD
Se requiere de un programador para modificar asesor experto de estrategia de ruptura. El EA realiza operaciones por quiebre de rango pero por operaciones de Orden de Mercado ( Ejecuta una operación de compra o venta inmediatamente al precio actual del mercado) y requiero cambiarlo a que realice operaciones de Orden P extremos. Adicional, requiere que se realice un filtro para entrar de nuevo al mercado en caso de
Hi there,my name si Andrea,i need help with building an indicator to save time while analyse the chart to support me according to my strategy.I would like to build some friendship and a good relationship to grow together.Im willing to share all my knowledge about trading in exchange for your work.There you have many opportunities to start a business such as trading itself or selling the indicator or whatever to a
Project information
Budget
40+ USD