Adjustment to 'include' file to prohibit new trades for X bars if last X trades were loss-making

MQL4 Uzmanlar

İş tamamlandı

Tamamlanma süresi: 3 saat
Geliştirici tarafından geri bildirim
All is good.

Şartname

 

Hi,

 I use an 'include' file to manage trades, stop-losses and various other functions to manage the trading of my EA. I have recently experienced that some of my EAs, which otherwise produce solid returns - turn nasty for periods ranging from 5-40 periods, consecutively open trades and run into stop-losses. I want to prevent my EAs to trade for a defined period (should be variable) based on the following conditions: if over the last 20 bars (the number of bars should be smth, which can be set within the actual EA) if it did one or two loss-making trades in the same direction (Again, the number of permitted loss-making breaks). So it is meant to be function as a time-out for my EAs if it clearly does not produce valid signals! So to summarize the function

IF last X trades were loss-making in the last X bars, do not trade for X bars 

 Attached you will find the 'include' file I use and a random simple EA - I choose one which produces a substantial number of consecutive losses. Of course, I want to be able to amend any settings within the EA itself.   Please feel free to write if you need any further information.

 

Cheers,

 

Philipp 

 

 

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(215)
Projeler
302
79%
Arabuluculuk
4
25% / 0%
Süresi dolmuş
62
21%
Serbest
Yayınlandı: 7 kod
Benzer siparişler
HFT Directional Grid Scalper (Simple, Training Project) Overview We are looking for a developer to create a high-frequency grid scalper with a simple, deterministic logic. This is not a complex bot — the goal is to have a clean implementation for training, testing, and educational purposes. The bot should: Continually open trades in one direction only (BUY or SELL) Use ATR-based grid spacing Maintain a fixed
I want a accurate indicator with buy and sell arrows or circle.. with exit points which trade xauusd and btcusd via weekend ... for small like R100 or 500 .... like which can grow small accounts with ... on for serious developer.. no bullshit ... I need on Friday please
I'd like to automate a relatively simple strategy in Sierra Chart, but I'd like to have it backtested and optimized first. Could we collaborate on this, and what would the cost be? Only bid if you think you can handle this project, and I want expert in sierra chart.. Thanks
I need an EMA crossover EA specifically for Boom and Crash. It should automatically buy and sell when crossovers happen. I want adjustable inputs for lot size, timeframe, and maximum loss. I’m keeping it simple because I’ve had bad experiences with EAs before. It should do only the job it is built for, properly and reliably. need someone who have already build EA or Indicator for Boom and Crash befor atleast 10
//+------------------------------------------------------------------+ //| ProTradingEA MT5 | //| Fully MT5-compliant with MACD, Trailing Stop, Break-Even | //+------------------------------------------------------------------+ #include <Trade\Trade.mqh> CTrade trade; // Optional override input string SymbolOverride = ""; // leave blank to auto-detect struct EASettings { int
I have access to an MT5 account. I have investor access. I would like to know if someone could help me create a bot that copies only the trades made on XAU/USD in that account but in my MT4 account. In that account, many trades are made across various pairs, and I realize that the conditions of their account are not very favorable for the type of trading they do, as the commissions are very high. I have an account
Good day, I would like to have an expert advisor for my MT4 indicator (Major key alert) that can scan and provide push notification messages for entry opportunities across different time frames when a when a signal is identified
"I need an MT5 EA based on price action — liquidity sweep + hammer/shooting star reversal strategy. TREND: Identified by HH/HL for uptrend, LL/LH for downtrend on selected timeframe. No trade in ranging conditions. BUY SETUP: In uptrend, price retraces to swing low zone, wicks below it (liquidity sweep), hammer forms (lower wick min 2x body, closes above swept low). Buy stop entry at hammer high. SL below hammer
I need a professional MQL5 developer to finalize a Gold (XAUUSD) trading bot. The core layering and support-filter logic is already drafted. Key Requirements: Refine a hybrid Martingale/Layering volume calculation (1-10 / 11-20 reset logic). Implement a robust "Safety Mode" based on Daily Low price breaks. Ensure precise 6:00 AM Server Time reset for logic variables. Add professional error handling (Slippage
I want a gold order management ea that should be like the below... Pending orders When I open one manual order, ea should be able to set 3 pending orders at x amount of pips below (if buy order) or above (if sell order) manual order entry. So like this Pending order 1 true or false Pending order pips away: 20. Pending order lot size:0.3 Pending order 2 true or false Pending order pips away: 40 Pending order lot

Proje bilgisi

Bütçe
10 - 30 USD
Son teslim tarihi
from 1 to 5 gün