Identify trend with last 2 appropriate candles and execute order.

MQL5 Asesores Expertos

Tarea técnica

Hi. Need a bot for mt5.

My idea - use two big candles to identify the trend. If first big candle is down and the one after it is up, then trend is positive. If first big candle is up and the one after it is down - trend is negative.

I need the bot to identify trend this way and open order according with the trend it recognised.

Order should have a stop loss, take profit and optional trailing in points.

If order didnt stop because of sl, tp or trailing - bot needs to monitor next trend identification and be able to close current order and open new one.

If order hit by sl then start to monitor last 2 candles to restart the strategy.

If order hit trailing or tp, start to monitor last 2 candles to restart the strategy.

Only scan for last 2 closed candles, dont open order if candle is not closed and next one didnt start yet.

Only one open order at a time.

Only candle body is important, no shadows (candle open and close price).

Bot has to work on any chart (crypto or forex). Only on the timeframe its attached to. Also need magic number to run same bot on many charts.


How to tell the bot which candles are big? In settings:

Points for first candle (more than x amount but less than x amount)

Points for second candle (more than x amount but less than x amount)

Stop loss in points

Take profit in points

Trailing stop (enable or disable)

Trailing start in points

Trailing step in points

Magic number


How it works.

Bot is always scanning for last 2 candles. Only candle body matters, no shadows. If last 2 candles are closed in a set range then look at second candle. If that candle is down then open sell, if second candle is up then open buy. If order hit sl, tp or trailing then start looking at last 2 closed candles again. If order didnt hit sl, tp or trailing, always keep monitoring for possible trend changes.



Han respondido

1
Desarrollador 1
Evaluación
(572)
Proyectos
664
32%
Arbitraje
42
45% / 45%
Caducado
12
2%
Trabajando
2
Desarrollador 2
Evaluación
(106)
Proyectos
173
25%
Arbitraje
23
9% / 78%
Caducado
16
9%
Trabaja
3
Desarrollador 3
Evaluación
(1)
Proyectos
2
0%
Arbitraje
0
Caducado
1
50%
Trabaja
4
Desarrollador 4
Evaluación
(62)
Proyectos
90
29%
Arbitraje
24
13% / 58%
Caducado
7
8%
Trabaja
5
Desarrollador 5
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
6
Desarrollador 6
Evaluación
(2663)
Proyectos
3388
68%
Arbitraje
77
48% / 14%
Caducado
342
10%
Trabaja
Ha publicado: 1 ejemplo
7
Desarrollador 7
Evaluación
(453)
Proyectos
715
34%
Arbitraje
34
71% / 9%
Caducado
22
3%
Libre
8
Desarrollador 8
Evaluación
(85)
Proyectos
174
44%
Arbitraje
3
100% / 0%
Caducado
5
3%
Libre
Ha publicado: 1 ejemplo
9
Desarrollador 9
Evaluación
(74)
Proyectos
84
27%
Arbitraje
8
13% / 63%
Caducado
4
5%
Libre
10
Desarrollador 10
Evaluación
(2322)
Proyectos
2925
63%
Arbitraje
123
45% / 25%
Caducado
429
15%
Libre
11
Desarrollador 11
Evaluación
(23)
Proyectos
34
53%
Arbitraje
1
100% / 0%
Caducado
1
3%
Libre
12
Desarrollador 12
Evaluación
(313)
Proyectos
559
35%
Arbitraje
80
31% / 44%
Caducado
203
36%
Libre
13
Desarrollador 13
Evaluación
(10)
Proyectos
11
0%
Arbitraje
3
0% / 33%
Caducado
1
9%
Trabaja
14
Desarrollador 14
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
15
Desarrollador 15
Evaluación
(24)
Proyectos
30
13%
Arbitraje
12
0% / 75%
Caducado
8
27%
Trabaja
16
Desarrollador 16
Evaluación
(278)
Proyectos
374
72%
Arbitraje
19
32% / 47%
Caducado
14
4%
Trabaja
Ha publicado: 14 ejemplos
17
Desarrollador 17
Evaluación
(6)
Proyectos
5
0%
Arbitraje
3
33% / 67%
Caducado
2
40%
Trabaja
18
Desarrollador 18
Evaluación
(3)
Proyectos
5
20%
Arbitraje
1
100% / 0%
Caducado
2
40%
Libre
19
Desarrollador 19
Evaluación
(458)
Proyectos
796
49%
Arbitraje
73
16% / 52%
Caducado
139
17%
Trabajando
20
Desarrollador 20
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
21
Desarrollador 21
Evaluación
(23)
Proyectos
29
31%
Arbitraje
0
Caducado
2
7%
Libre
22
Desarrollador 22
Evaluación
(162)
Proyectos
289
35%
Arbitraje
18
22% / 61%
Caducado
43
15%
Libre
23
Desarrollador 23
Evaluación
(8)
Proyectos
8
0%
Arbitraje
2
50% / 0%
Caducado
1
13%
Libre
Solicitudes similares
I want to convert an MT4 Fractal Breakout EA to MT5. This EA places pending stop order to capture the fractal breakout and trail it. No complex indicator or rules. Enable only Buy or Only Sell or Both Buy Sell option in any indices. MT4 backtest should match Mt5 to some extent
Hello! Is there any person who can teach me Forex. I prefer high time frame strategies Like H4, D1, but I am open for your propositions. Have a nice day
SNIPER X AI 30 - 200 USD
I really need a developer Who can help me to create my SNIPER X AI - Elite AI Trading System Overview SNIPER X AI BOT is an AI-assisted trading system for Forex, Crypto, Stocks, Indices, and Gold. Currency: USD,RAND,KWD, POUND,EURO Core Features AI Scalping, Sniper Entries, Auto Buy/Sell, Smart Risk Management, Telegram Alerts, Mobile Monitoring, VPS Deployment. Supported Platforms MetaTrader 4, MetaTrader 5, Exness
Emmanuel bot 30 USD
No thank you just choose for me I need to be automatically buy and sell and take a profit only that is enough for me thank you so much and my name is Emmanuel kabale
Emmanuel bot 30 USD
No thank you just choose for me I need to be automatically buy and sell and take a profit only that is enough for me thank you so much my name is Emmanuel kabale
I am looking for a professional developer to create an automated trading bot for Synthetic Derivative Indices. The bot should be designed for efficiency, precision, and stability, with the ability to execute trades automatically based on predefined strategies and market conditions. and synthetic indices trading is essential for this project
Existing EA needed Hi, Im looking to purchase or build an EA that can open many trades or big lot size to churn out IB commission, it doesnt have to be super profitable but will need to have the number of trades on going in order to earn IB commission. If you have any EA or strategy that are gearing towards this, let me know and i would be glad to purchase it
Limzy 30+ USD
//+------------------------------------------------------------------+ //| HighPerformanceEA.mq5 | //| Copyright 2026, AI Developer | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2026" #property link " https://www.mql5.com " #property version "1.00" #property strict //
I need an experienced MQL5 developer to build a professional XAUUSD scalping Expert Advisor. The trading logic is already fully defined and will be shared privately with selected developers. Requirements Fast execution suitable for scalping Dynamic lot sizing Strict risk management Clean and optimized MQL5 code Compatible with MetaTrader 5 Additional Rules No repainting logic No delayed execution Avoid duplicate
It seems we need to convert this mql5 file into another platform like MULTICHARTS, NINJATRADER, SIERRACHART or other platform, I am open forr your sugestion, propositions, integrations etc. Anybody will help me with this project here? Source of code required

Información sobre el proyecto

Presupuesto
30+ USD