指定
#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());
}
}
}
}
//+------------------------------------------------------------------+
応答済み
1
評価
プロジェクト
311
28%
仲裁
33
27%
/
64%
期限切れ
10
3%
仕事中
2
評価
プロジェクト
191
58%
仲裁
10
80%
/
0%
期限切れ
0
仕事中
パブリッシュした人: 1 code
3
評価
プロジェクト
570
37%
仲裁
106
39%
/
33%
期限切れ
17
3%
暇
4
評価
プロジェクト
2
0%
仲裁
1
0%
/
0%
期限切れ
0
暇
5
評価
プロジェクト
400
27%
仲裁
39
41%
/
49%
期限切れ
1
0%
暇
6
評価
プロジェクト
631
33%
仲裁
38
39%
/
50%
期限切れ
11
2%
仕事中
7
評価
プロジェクト
256
30%
仲裁
0
期限切れ
3
1%
暇
パブリッシュした人: 2 codes
8
評価
プロジェクト
472
40%
仲裁
103
40%
/
23%
期限切れ
78
17%
多忙
パブリッシュした人: 2 codes
類似した注文
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
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
プロジェクト情報
予算
40+ USD