Mql4 code to detect the last trade to close

MQL4 Experts Strategy modules

Tâche terminée

Temps d'exécution 24 minutes
Commentaires du client
Quick and good commumication. Did small job for me without delay and instantly made small requested adjustments. Would use again.

Spécifications

Hi,

I need a code written to detect when a trade closes, the last one, so it can be used to run a block of code everytime a trade closes.

So I guess something like this.

 bool tradeclosed
{
code to check if a trade just closed
tradeclosed=false
}
else
{
traseclosed=true
}

//So if a trade just closed
if(tradeclosed=true)
{
run my code
}

Thanks for looking

Répondu

1
Développeur 1
Évaluation
(53)
Projets
74
26%
Arbitrage
30
10% / 63%
En retard
22
30%
Gratuit
2
Développeur 2
Évaluation
(22)
Projets
28
29%
Arbitrage
3
0% / 67%
En retard
7
25%
Gratuit
3
Développeur 3
Évaluation
(221)
Projets
412
61%
Arbitrage
13
38% / 23%
En retard
163
40%
Gratuit
Publié : 51 articles, 1 code
4
Développeur 4
Évaluation
(50)
Projets
80
39%
Arbitrage
4
50% / 25%
En retard
0
Gratuit
5
Développeur 5
Évaluation
(258)
Projets
269
29%
Arbitrage
2
50% / 0%
En retard
3
1%
Travail
Publié : 2 codes
6
Développeur 6
Évaluation
(365)
Projets
507
40%
Arbitrage
159
17% / 74%
En retard
99
20%
Chargé
7
Développeur 7
Évaluation
(221)
Projets
369
66%
Arbitrage
10
50% / 0%
En retard
46
12%
Gratuit
8
Développeur 8
Évaluation
(66)
Projets
95
28%
Arbitrage
20
25% / 55%
En retard
24
25%
Gratuit
9
Développeur 9
Évaluation
(130)
Projets
184
32%
Arbitrage
18
28% / 67%
En retard
27
15%
Gratuit
Publié : 1 code
10
Développeur 10
Évaluation
(1156)
Projets
1462
63%
Arbitrage
21
57% / 10%
En retard
43
3%
Gratuit
11
Développeur 11
Évaluation
(646)
Projets
874
48%
Arbitrage
29
38% / 17%
En retard
63
7%
Travail
12
Développeur 12
Évaluation
(90)
Projets
118
17%
Arbitrage
44
23% / 39%
En retard
20
17%
Gratuit
13
Développeur 13
Évaluation
(94)
Projets
148
59%
Arbitrage
16
38% / 13%
En retard
25
17%
Gratuit
Publié : 1 code
14
Développeur 14
Évaluation
(574)
Projets
945
47%
Arbitrage
309
58% / 27%
En retard
125
13%
Gratuit
15
Développeur 15
Évaluation
(4)
Projets
6
0%
Arbitrage
2
0% / 50%
En retard
4
67%
Gratuit
Commandes similaires
Project: Custom MT5 Day Trading Expert Advisor I need a custom automated trading robot (EA) for MetaTrader 5, developed in MQL5. Markets: - Gold (XAUUSD) - Selected Forex pairs Trading style: Automated day trading. All positions should be closed according to predefined strategy rules and before the end of the selected trading session. Strategy: The developer should propose a clear trading strategy, explain its rules
Hi, I need NinjaTrader 8 Strategy Analyzer backtests on two of my strategies, each over 1 year AND 3 years of data. Please quote the full job. Common settings: NT8 Strategy Analyzer, MCL (Micro WTI Crude Oil) continuous front-month contract (MCL ##-##), 5-minute bars, 1yr + 3yr of the most recent data, $2.50 round-turn commission per contract. Deliverables per run: full Strategy Analyzer summary (net profit, profit
a { text-decoration: none; color: #464feb; } tr th, tr td { border: 1px solid #e6e6e6; } tr th { background-color: #f5f5f5; } Project Description I need an Expert Advisor (EA) for MetaTrader 5 (MT5) that can automatically trade Gold (XAUUSD) and major Forex pairs. The EA must analyze market conditions, open and close trades automatically, manage risk effectively, and be fully compatible with the MT5 Strategy Tester
To create a unique description that meets the freelance site's requirements, you can type the following: "I am looking for an experienced MQL5 developer to create a custom Forex Expert Advisor. The trading strategy should be based on a moving average crossover system, filtered by the Relative Strength Index indicator. The expert advisor needs to feature distinct strategy modules with adjustable settings for the
Hello, I’d like to develop an AI-powered analysis dashboard for , with a clear, easy-to-use design that works on mobile and web, or on the platform we agree on. I’d like it to include: Main dashboard: Show the market status, the latest data update, and the current signal, if available, including direction, entry price, stop loss, targets, and risk-to-reward ratio. AI signal explanations: Explain in clear language why
Scalping bort 30+ USD
GOLD SCALPING BOT STRATEGY Symbol: XAUUSD (Gold vs USD) Broker: Exness Account: Standard Starting Balance: $20 1. TIMEFRAME - Trend analysis: M15. - Entry timeframe: M5. - Trade only when the market has a clear direction. 2. INDICATORS - EMA 50 - EMA 200 - RSI 14 - Support and Resistance 3. BUY RULES The bot must open a BUY trade only when all these conditions are met: 1. EMA 50 is above EMA 200 on M15. 2. Price is
Request for an Existing Automated Trading System (Expert Advisor) I am looking to acquire an existing, fully functional Expert Advisor (EA) that trades Forex CFDs, with the option of trading other CFDs if the strategy supports them safely. Performance objectives Target average net monthly return: 1.5%. A consistent 1.0% monthly return may be considered if the system demonstrates strong risk control and credible
Are you able to build one bot for stock and one for ninja trader and tell me the win rate on it. I need ninja trader bot that enter buy and exit according the move to do not stay long in the market in each entry . That can follow the smart money concept or other if you have a good one
I need a TradingView Pine Script (v6) indicator that gives BUY and SELL signals in real time on the live chart. MAIN REQUIREMENT – NO REPAINTING: 1. Signals must appear only when the candle closes (barstate.isconfirmed). Example: on 1-min chart, signal for the 10:35 candle must appear at 10:36 and never disappear or move. 2. Signals on historical bars must look exactly the same as they looked live. 3. No lookahead
i need someone to help me create 3 random tradingview strategy i need it for a test, i need it to have 5% to 20% win rate and 1:1 RR, the win rate is very important is the main thing i need those strategy for, i am planning on building a tradingview strategy and i need this 3 tradingview strategy first they are for test on my plans to build the main tradingview strategy, also for he 3 i have a fixed budget of $30 for

Informations sur le projet

Budget
30+ USD
Délais
de 1 à 3 jour(s)