I'm writing a hedging EA, and in a section I try to close multiple open positions once I've hit a specific profit target. The logic loops through all positions, checks if it is the correct ENUM_POSITION_TYPE, and executes the PositionClose() function with the matching position's ticket number. For
I am currently backtesting my EA using 1 minute OHLC but since the EA trades on a higher time frame, there are a lot of "unnecessary" ticks that the EA is being run on slowing down the optimisation. What I would like to achieve is to send every single tick to the EA until it enters into a trade
Hi, I have this situation where my EA opened a pending order at 1.30330 and I have this function to check if there is any pending order when passing value 1.3033 and its not working //+------------------------------------------------------------------+ //| Check Pending Orders
Somehow I got logged out of metatrader. I cannot remember my username and password. I can't find anything to reset or send email to reset
Hi, for some time, I've been using market orders to execute partial take profits in my EA executed after my code inside OnTick identifies the market reached the desired partial take profit level. The problem is that such system has issues with backtesting with "OHLC 1 minute" mode: instead of the
I used to load older versions of EAs (from 2020) on MT5 terminal on my old PC. With the new PC (the old one has died), I've downloaded mt5, but it only loads the recent version of the EA on a chart it doesn't load the older versions (from 2020). I want to use an older version EA from 2020, because I
I have been waiting for a moderator to Okay my EA, which I am placing in the market here but they have not yet responded. Actually, I have tried before and they pointed out changes I needed to make in order to comply with the mql5 community rules. But the truth is I left the listing for some time
string CheckEntry() { // create an array for prices MqlRates PriceInfo[]; // sort the price Array from the current candle downwards ArraySetAsSeries (PriceInfo, true ); // we fill the array with the pricedata //int Data = CopyRates(Symbol(), Period(), 0, Bars (Symbol(), Period())
Hi there, I'm fighting with my advisor. It is working well on indizes like DE30 or US500 but on EUR/USD it is not working. I'm getting errors like "invalid price" or "invalid stop". My Adviser derives from Include\Expert\Expert.mqh (CExpert) and I found something in the init function that needs some
[Deleted]
UPDATE NOTE: Finally the issue have been sorted out. Hi Wishing Happy Weekend to all. I am struggling hard to create an optimized "Normalized Volume Indicator ". I have used few other methods too including MAOnBuffer() functions. Following code is my latest attempt, the same code I am using in Price
Please I have an EA am using in demo trade. How can I can I transfer the EA to my real trade?
Hi all, Im having issues finding an EA that can trade the moment the Fast EMA cross up over the Slow EMA, then when the Fast EMA crosses the Slow EMA back down it can close the long trade and open the sell trade. I also want to be able have a Stop Loss and Trailing Stop Loss. I keep downloading
Hello guys, i've just started making this experts advisor. The entry is running well, but i cant sorted out about the closing code. Please help :) #include <Trade\Trade.mqh> CTrade trade; void OnTick () { double Ask= NormalizeDouble ( SymbolInfoDouble ( _Symbol , SYMBOL_ASK ), _Digits );
Hi, I would expect the following code to work. But MQL giving "'Order' - illegal returned type". Any idea why? C # namespace ExpertAdvisor { public class ExpertAdvisor { [DllExport] public static Order Order() { Order Order = new Order();
Hello There is a problem in new metatrader5 release This is an expert int OnInit () { Comment ( "Please Wait..." ); return ( INIT_SUCCEEDED ); } Problem is Comment When Comment a message whole metatrader5 crashes Thanks
I wrote the following code. I expected to have one operation per year. However I see that many operations are missing. For example: EURUSD (1971-2021) it has 50 years of history but I only get 23 trades. I have tried with many currency pairs and commodities and many operations are missing as well
Hello, I am struggling to find anyone to develop my EA.
Its up in the freelance section and is relatively simple if not already exists.
I have been trading manually for a few years now but having decided automated trading may be worth trying, I have very little knowledge of MQL5, code base,...
I am trying to create an EA. I have a strategy I would like to try out. I have very minute coding knowledge. I need directions on how to go about
[Deleted]
Dear Members I am trying to use <MovingAverage.mqh> SimpleMA method in a Class. I have defined arrayClose[] and used CopyClose to get closing prices into array. However, when I use this array in SimpleMA(index,MAPeriod,arrayClose); it is returning 0.0 for SMA values. Is it necessary to use SimpleMA
Hi! I have a question about a hotly debated subject, but I still don't have a solution to my problem, so I would be grateful for suggestions on how to get a solution for my case. I have a strategy in an EA that uses Martingale, and therefore doubles the lot when the previous operation is at loss
This EA is here https://www.mql5.com/en/code/15848. Please fix it to work in Metratrader 5.
I want to read, for eg. the live RSI of EURUSD, AUDUSD, CADJPY when I'm running EA on NZDUSD chart every several ticks passed on NZDUSD, however, I don't want to open the EURUSD/AUDUSD/CADJPY chart all the time. I remember in such case the EURUSD etc. might not always keep refreshing and will return
Hi. I've created my first EA. If I set SL and TP in the code, the Tester runs but no operation is opened. If I don't set SL and TP (or I set them to 0) the Tester runs and open operations, but obviosly, no action is taken by SL and TP: the operations go on until the end of simulation and the
[Deleted]
I have coded an EA which trades the Ichimoku of RSI. It is compiling no errors, no warnings but its not running any trade even on the strategy tester . In case i missed a certain line of algorithm or did something wrong, may you assist. #property link "https://www.mql5.com" #property version
Greetings, I'm wondering if anyone of you could tell me if it's possible to have a developer from this MQL5 forum create me a program that scans the Telegram Signal channels I'm following for latest messages and if it shows wording like the following down below, it will instantly place those 3
[Deleted]
UPDATE NOTE: Sorted out by correcting the dot with colon in Time, as pointed out by William. Dear Members Please help to debug what is causing the second Data definition as "invalid time" warning !!! Warning "invalid time" CTradeState.mqh 141 40 SetTradeState(D'2021.01.01 20:00', D'2021.01.01
Hi, I'm opening this thread here to discuss possible things that can slow down the backtest. I created an EA and its backtest is very slow and I don't know why. I would like to know what the possible causes of this slowness are
Hello, I am starting to code in mql5 and I am devloping a code that opens one positions every time there is a crossover of daily EMA8 and daily EMA21 and price is above daily SMA200. I do get to open 2 positions, but there are not any more positions but conditions are being met... I am not getting
Hello! I am new to developing on MQL5 and basically coding in general. I watched a step by step tutorial in order to learn how to code a simple MA crossover. The problem is that I am getting several errors in lines 23,25 and 41 and despite the fact that I have been trying to resolve them for a few

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.