//PSEUDO CODE Signals : at least 3 signals to monitor (could add up some later) confirmation signals: 2 signals // I created boolean functions to identify these signals // with ENUM_TIMEFRAMES and CandlePosition as input parameters TimeFrames : HigherTimeframe, MiddleTimeFrame, SmallestTimeFrame
Good morning you all, I wrote an Expert Advisor that opens order when all the condition I put meets. Analyzing that, I noticed a problem. When the condition meets it opens order, but if the order do not open because the free margin of my account it's too low (the reason of that is because I have
Hi, hoping to get some help with this. Please see my code below. So I have managed to return the data I want as shown below from the first "Print(_result);" I have the raw data as a returned object: However I was wanting to access specific parts of this object. I would have expected " Print
Hello Guyz. I need help. For the last 10 months I've been working on creating my own EA. Happy to say I'm pleased with what I've done. I noticed however through back testing that sometimes for days I will will hit an almost endless stream of one loss after another. What I would like is to include a
Hi there, I am trying to find the highest & lowest closes for the last five bars in an array excluding bar 0. So far I have this. Can someone please double check this is correct. MQL5 // Create array of price data MqlRates priceInfo[]; // Sort array from current candle downwards
MT5 question Hi guys, I'm have a button on my panel and need to call FileFindFirst() to get handle of files in a folder when clicking on the button. everthing is good at mql4, buy I want to convert my source code to mql5. I don'k know why i can not get file_handle by click event. if I click on a
Hi All, I need help with This code, it compiles without Errors but when test it , it's not working . I hope you guys help solve this problem 😊 //+------------------------------------------------------------------+ //| Close All Positions At Certain Time |
Hi guy i have a piece of code that popup a confimation box for signals that is been generated by my EA, but it work good only when i press the yes button to open the trade. What i need is the way to ignore the signal when i press No, and let the EA to wait till next period before popping up the box
Hello to everybody! :) I'm trying to pass my EA from mt4 to mt5 but I 'm having problem with backtasting the code.. I've tickhistory, I've downloded the full histoy of EURUSD pair, I've create a custom symbol named EURUSD_tickhistory coping from the orginal EURUSD symbol and then imported all the
I have been using the code below to prevent portions of my code from executing more than once per bar. How can I hard code a specific duration, say 5 minutes?Int BarsCount = 0; int start(){ if (Bars>BarsCount) { //executed only once per bar BarsCount = Bars; } return(0);}Please...
hello folks , i have this function that i need to get the last position open price so that i can use it to create grid positions to my EA but the problem is that this function becomes very slow to show values when i print out to see if everything is okay ,and not only on printing the function does
Hello guys, I wanna iterate thru indicator buffers of different timeframes/periods and check for signals. #include <Arrays\ArrayObj.mqh> CArrayObj m_arr; //params for rsi indicator double RSI_M1[]; double RSI_M5[]; int RSI_handle_M1; int
Hello, I'm attempting to backtest an EA using optimization and getting these strange results: The first pass goes fine but then all following passes have huge (incorrect) profits. If I stop the backtest and double click on one of the bad passes and run it individually without optimization it works
Hello, I have several broker accounts, one on MT4, one on MT5 and planning to open another one on MT5. The reason I have many is so that I can run each one with their own Expert Advisor and partition/split my risk - If one EA blows up an account, it won't affect the other ones. I have about 3 VPS
Hi, I try to program a simple script. My question: How do I get the value of the ATR (average true range) indicator in a script? I've found the function "iATR" (https://www.mql5.com/en/docs/indicators/iatr) but it does not return the current ATR value. Any ideas? Thank you. Best, Chris
Hey Guys, my issue is the following: I have an EA which has to send out messages via Telegram. If i put him on the chart he does everything right, sends the message out if specific paramters are valid. But if some candles go by and then its again valid, he doesnt send out a message, although he
I'm scouting for an EA to take a trade on the Moving Average of my choice in the time frame of my choice. Also, one that would close a trade upon a MA crossover. An alternative would be to send an alert upon crossing a moving average on a designated time frame. Thanks for any input
Hello everyone, If I have a signal on MQL5.com, can I publish it on other signals pages or is it prohibited? Thanks
Hello everyone, I am looking for different types of EA. What is the best mode to backtest EA with scalping strategies? 1min OHLC, every tick or based on real ticks? Thanks
hi all does the return function go up just one level or all the way to the very top root (ontick) for ex if you have 5 nested loops/ifs, if the 5th one hits a return, will it go back to the ontick or just to the 4th level loop? tnks
Hello all, I looked on past posts here and elsewhere, tried, tried and tried but still I am stuck. Can anyone lend a hand? I simply want to write a basic EA that works. This is my code: #include <Trade\PositionInfo.mqh> #include <Trade\SymbolInfo.mqh> #include <Trade\OrderInfo.mqh> #include
Hello all I looked on past posts here and elsewhere, tried, tried and tried but still I am stuck. Can anyone lend a hand? I want to change NaN values with zero. This is simply my code: double a= 5 ; double b= 0 ; double c=a/b; if ( MathIsValidNumber (c)) c=c;
Hello everyone, I have 2 different EAs. Each uses own MTLicenseLib.ex4 File. But now I want to use both EAs in one account. In the "Libraries" folder the MTLicenseLib.ex4 is always queried when the EA starts. Copying the second one and renaming it would not help. What can I do to use the two
I'm trying to get my Expert Advisor to take the amount of recent loser, but add let's say $20 to obtain some level of profit. At this time its breaking even, which isn't a bad thing after a losing trade. But I'd like to see if I can push it further. Here is my code for the MM part: if (lastLot> 0 &&
Hello Guys I want my EA to open only one trade per day. I do not know what code to use.Please help me if you know.،Thanks aLot
Hi, I'm new to automated trading and all these coding stuff. I just learned about parameter optimization. For a long time I've been dreaming of some function like this, and today I just learned MT5 has it built in it. As I think, this is just an ultimate tool. So because not everyone is already
I am trying to follow this article https://www.mql5.com/en/articles/4917 He is setting the optimized parameters as global variables. But how do I use them in my EA? I can't set input parameters to global variables because they require a constant. And if I cancel all the inputs and just make them
I have written an EA to trade using candlestick patterns and I'm mainly testing it on the 4 hour timeframe . Using historical data, the majority of all trades are executed at the expected times - 08:00, 12:00, 16:00, 20:00 But for some reason, there are a significant number of trades at 19:00 I have
I am sure that it is not my fault. The file is normal. I have been notified that the verification has been passed and I can apply for the release of this product , but the release button does not appear. Trying other browsers does not work too. How to solve this problem? Looking forward to your
//+------------------------------------------------------------------+ //| NLT2.mq5 | //| Copyright 2020, MetaQuotes Software Corp. | //| https://www.mql5.com |

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.