Hi dev,
I want to code a MQL5 EA as described below.
I can provide my custom tradingview pinescript v5 code as a reference.
*** Strategy description ***
The strategy looks for a specific 4 candle pattern to open long or short.
Current candle is candle 0, previous candle is 1 and so on.
For longs: Current candle closes above previous candle’s high (candle 1) and also closes above candle 3 high.
For shorts: Current candle closes below previous candle’s low (candle 1) and also closes below candle 3 low.
The candle pattern is only valid on bar close.
*** Entry conditions ***
Once a pattern is detected we will stop looking for new patterns until the trade is closed or cancelled. If the limit order is not triggered in X number of candles we cancel the limit order and restart looking for candle patterns. If before the trade is triggered we get a contrarian signal we also cancel the trade and open the last one to appear.
Here is the candle detection code in pinescript V5:
bool greenTriangle = close > high[1] and close > high[3] and not prevGreenTriangle
bool redTriangle = close < low[1] and close < low[3] and not prevRedTriangle
When the pattern is detected a limit order is set to X pips above the last candle for longs or under for shorts. This makes sure that the trade will only open if the price actually moves in the direction of the signal. If the price moves in the opposite direction we will end up canceling the order after X candles or a contrarian signal.
That’s all for the trigger conditions.
*** Exit conditions***
For exit we use a fixed stop loss value equal to X pips and a dynamic take profit that is a multiplier of the ATR value (period 7 candles and multiplier 0.7 for instance).
An open position should also be closed if we get an opposing candle pattern.
*** Position size ***
In terms of position size we risk losing 1% of the account per trade. If this results in a value bigger than the whole account we use 90% of the account as position size.
The strategy only keeps one long or one short open per time so there is no pyramiding.
It should be possible to define two time periods for opening trades per day. For instance from 08h00 UTC to 12h30 UTC and again from 14h30 UTC until 21h00 UTC.
Closing trades can be anytime since we defined the stop loss and take profit already.
We should have an icon indicating a long and one for short. Position entry price, stop loss and take profit should also be displayed.
Please see attached image for an idea of what it should do.
Thanks
Benzer siparişler
I have a open source Tradingview indicator that I want it to be converted to Ninja Trader8. I have attached it. Please let me know, if you can do it and for how muc
I need help in modifying an amibroker AFL indicator the indicator already works but I need per symbol static variable isolation, parameters persistence per symbol after restart, non declining trailing stop logic, parameter auto restore when switching symbols and a global reset function for static variables. For better understanding As discussed, this is the official offer for restructuring my RAD Chandelier stop loss
🔥 ICT_OneTrade_2R Precision. Discipline. Consistency. ICT_OneTrade_2R is a professional Expert Advisor designed for traders who value structured execution and controlled risk. This system is built around a fixed Risk-to-Reward ratio of 1:2 (RR 2.0) — meaning every trade is planned with precision: Risk 1 → Target 2. No randomness. No overtrading. Just one high-quality trade per session. ⚙️ Key Features ✔ Fixed RR 1:2
Apply with a keen sense of responsibility . Copy the code . Both of my expert has sufficient materials . Its a simple winning strategy , therefore please be ahead of time . Code BLUE . Changing The Strategy According to what i think is correct
mport pandas as pd import numpy as np def detecter_tendance(data): # Code pour détecter la tendance pass def identifier_niveaux(data): # Code pour identifier les niveaux de support et de résistance pass def calculer_stop_loss(tendance, support, resistance): # Code pour calculer les stop loss pass def calculer_profils(tendance, support, resistance): # Code pour calculer les profils mport pandas as pd
Hello there Hpe you are doing good I am in search of a pine script expert developer who can build strategy in apudFlow in pinescript. Kinldy bid on this project if you can do this
I need a scalping-specific logic MT5 trading bot with a Donchian-channel–based dynamic stop-loss and take-profit system, applies RSI volatility filtering to avoid low-quality setups, and allows asset-specific adjustable parameters for fine-tuning performance Trading details: - Symbol: Any Forex EUR/USD - Platform: MT5 - Strategy type: Scalping (fast trades) - Timeframes: 5sec/ M1 / M5 - Fixed Stop Loss and Take
European Central Bank (ECB) Interest Rate Decision The European Central Bank left interest rates unchanged at its first policy meeting of 2026, in line with expectations. source: https://www.mql5.com/en/economic-calendar/european-union/ecb-interest-rate-decision '407332776' : added order #481999464 sell 0.01 BTCUSDm at market
I am looking for a professional developer to build a custom trading analysis software for me. This tool is NOT an automated trading bot (EA); it is an analysis dashboard to help me identify high-probability setups based on my strategy. Key Requirements: Multi-Timeframe Analysis: The software should scan 4 different timeframes (M15, M30, H1, H4, D1, WK1, MTH1) and alert me when my conditions are met. Indicator
I would like someone Who can design an EA for me. I will give him the Required Details and Trading Plan How it should Work. its going to be a Simple EA System Around Moving Averages Crossover. I will Provide Him the Moving Averages Settings and How It should execute trades and Exit them