Specifiche
#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());
}
}
}
}
//+------------------------------------------------------------------+
Con risposta
1
Valutazioni
Progetti
311
28%
Arbitraggio
33
27%
/
64%
In ritardo
10
3%
In elaborazione
2
Valutazioni
Progetti
191
58%
Arbitraggio
10
80%
/
0%
In ritardo
0
In elaborazione
Pubblicati: 1 codice
3
Valutazioni
Progetti
570
37%
Arbitraggio
106
39%
/
33%
In ritardo
17
3%
Gratuito
4
Valutazioni
Progetti
2
0%
Arbitraggio
1
0%
/
0%
In ritardo
0
Gratuito
5
Valutazioni
Progetti
400
27%
Arbitraggio
39
41%
/
49%
In ritardo
1
0%
Gratuito
6
Valutazioni
Progetti
631
33%
Arbitraggio
38
39%
/
50%
In ritardo
11
2%
In elaborazione
7
Valutazioni
Progetti
256
30%
Arbitraggio
0
In ritardo
3
1%
Gratuito
Pubblicati: 2 codici
8
Valutazioni
Progetti
472
40%
Arbitraggio
103
40%
/
23%
In ritardo
78
17%
Occupato
Pubblicati: 2 codici
Ordini simili
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
Spikes EA
30 - 200 USD
Got you 🔥 You want a clear link name + eye-catching brand name (I’m guessing for trading or a forex page since you’ve been working on bots and strategies). Here are powerful name + link ideas 👇 🔥 Strong & Professional Names PipEmpire 🔗 pipempire.com 🔗 pipempirefx.com GoldWave Traders 🔗 goldwavetraders.com SmartEdge FX 🔗 smartedgefx.com QuantumPips 🔗 quantumpips.com CapeCapital FX (since you're in Cape Town
Spikes EA
30 - 200 USD
Got you 🔥 You want a clear link name + eye-catching brand name (I’m guessing for trading or a forex page since you’ve been working on bots and strategies). Here are powerful name + link ideas 👇 🔥 Strong & Professional Names PipEmpire 🔗 pipempire.com 🔗 pipempirefx.com GoldWave Traders 🔗 goldwavetraders.com SmartEdge FX 🔗 smartedgefx.com QuantumPips 🔗 quantumpips.com CapeCapital FX (since you're in Cape Town
Tradovate API to mt5
50 - 60 USD
Obtain indicator signals from tradovate use them to generate and control EA in mt5 Indicators include delta, volume , bid ask above x, big orders absorption. Stacked imbalance and failed auction. When their is confluence it make for entry and exit
hello people, i have this bot, it works, however i would like my own version similar as the developer isn't reliable and some things don't work Bitcoin Scalping Robot MT4 | Buy Trading Robot (Expert Advisor) for MetaTrader 4 i would like similar strategy with the addition of autolot sizes, obvs i have the set file
Robot mt5 scalping xauusd
100+ USD
Hello, professional programmers! I'd like to request a special service. I need a trading bot like the one in the video, one that works on real accounts. My only request is that I don't pay any money until the bot is built and tested. Thank you very much
MT5 Manual Trade Panel
250 - 600 USD
MT5 Manual Trade Panel with Risk % Lot Calculation & User License System 11 hours ago MQL5 Experts Forex Trading robot/indicator debugging C++ Strategy modules Panels and dialog boxes Hello, I need a professional MT5 manual trading assistant panel (NOT auto trading EA). MAIN IDEA: A clean manual trading panel similar to TradingView long/short position tool inside MT5, designed mainly for Gold scalping (M5 /
Informazioni sul progetto
Budget
40+ USD