MQL4 and MetaTrader 4 - page 267

Hi all, could you help me with this approach, i need to code a signal that opens a trade n days before the end of the month or n first days of new month. Could you help my with pseudocode please?. Best. 
Hello, I currently have this code that shows the high and low of the previous day but I need it to show the high and low of the previous day but at a specific time it would be from 23:00 to 14:00, how could I do it? I have no knowledge of programming! const string h0="H0", h0S = "H0Str", h1="H1"
Hey, so I have a custom indicator that does all the logic behind the strategy and it send an arrow whenever it's to buy or sell. And on my EA I what to check if the value of the index buffer is empty or not. Here is my arrow setup on the Indicator: SetIndexBuffer ( 0 , SlowDnPts); SetIndexBuffer
Hi All, I am a newbie in programming. I am trying to build an expert advisor based on Engulfing Pattern. That is, I want the EA to open a long position after a Bullish Engulfing is formed in an uptrend (50 EMA is above 200 EMA) and to open a short position after a Bearish Engulfing is formed in a
The MetaTrader 4 platform update will be released on Friday , July the 24th, 2020. This version provides enhancements for built-in MQL5.community services, as well as error fixes and platform stability improvements. The update will be available through the Live Update system
Not open order ineed return my money back
Hello, I want to know how to pass an array which is in another array struct to a function by reference. struct SRLines { string name; double price; }; struct CiCSupAndResLines // Support and Resistance Line from SmartLine Indicator { string symb; SRLines M1[]; SRLines M5[]; SRLines
Can anyone help with this please? I have previously added EA's to my MT4 on my iMac with no problem but I have just acquired a new one and it will not paste into the Expert Folder. I copy from the unzipped folder file and click on Paste into the Expert Folder in MT4 but nothing happens? I have
Hello, I've been having this issue for quite some time. Every time I reboot my computer the indicators that I have downloaded from the MQL5 market won't load onto my charts. I have to go back into the mql5 market and redownload the indicators everytime. I have mt4 installed on two computers and
#define FLAT = "h1_flat" ; //... some code string trend = FLAT; Getting error '=' - operand expected SignalGenerator.mqh 69 25 When I do not use constant but assign string, no error. Does not make sense. What is wrong here? How to assing constant to variable? Update: solved - had to be this way. But
Hi there, I've been looking at the adding the custom indicators as a resource to package up my Expert Advisor into 1 package. It all seems to work fine with one caveat... it's sooo slow. My Strategytester now runs a fraction of the speed compared to when I addressed the Indicator in the Indicators
hi, i have a variable in the ontick which is based on a moving average so it keeps on changing (and thats good) I know I can't use it in a function since its not global, but if I declare it globally the value will be fixed to that when it was first loaded. for now i'm reclaring the varible both in
Lets say our criteria for movement is that it will be movement if its over 250 pips
Hi everyone, I had a MQL4 strategy based on the ticks but unfortunately I needed the duration between two ticks. I thought that GetTickCount() did the job, but I have just understood the GetTickCount relies on the computer time, so at each run of the same test in the same interval of course I don't
Hello I have this code that adds a fibonacci configured with risk / reward .. but I need it not to be added when adding the EA to the chart as the code currently does, I need the fibonacci to be added to the chart when I use the buy or sell button so I wanted to know who can help me with this code
Hi guys! 1)Can I have an example of stop at breakeven? 2)In the backtest, the breakeven works, but in real it doesn't work, why? Thanks. Marco
Hi is this even possible in mql4 ? Being able to comment/uncomment lines within the file depending on the result of some lines somewhere within the same file? for eg: if ( x) { comment lines 25 - 30 ; } else { uncomment lines 55 - 58 ; } or How this/similar can be achieved with use of any device
As customary, many of us will use: SymbolInfoDouble(NULL,SYMBOL_BID); or SymbolInfoDouble(NULL,SYMBOL_ASK); or MarketInfo(NULL,MODE_ASK); and those will work ok most of the time, however, for some of us they return 0 while implemented in the Strategy Tester. I am presenting here an alternative...
  Can somebody help me? MT4  (13   1 2)
Hello I would like to know if someone could give me a hand .. I am not a programmer but sometimes I like to play with codes .. to the subject .. I have a script that its function is: when adding it to the graph it adds a fibonacci retracement but modified with risk reward .. I would like to know if
Hi, I have a problem to translate MQL indicators from MQL5 to MQL4. ( https://docs.mql4.com/constants/chartconstants/enum_timeframes ) For the example, I will use iMFI ( https://docs.mql4.com/indicators/imfi ) With a simple print, I can see that MQL5 timeframes are not loaded (M2, M20, H2) but MQL4
Hello Iam very new to coding and trying to make an ea. i need to get info about last open trade and also last closed like Open time .Close time . Type of trade etc and i have made this code it's not working is there a better way to get these info double lastOrderInfo( string N, int type) {
Hi there, Where can I get a Renko bars indicator for MT4? If anyone can help, it would be much appreciated REgards, Tania
Hello All . Please help . I am trying to do the following . but i cant figure out how ? I tried to use if else It does not give the wanted result. Any advice/fix please. 1.if I choose userinput value 2 then the value of shift should be cross_ago ( another user input value ) and then it should do the
Hi, does anybody know how to open a new trade and then modify all current trades to the same tp, currently my EA can modify the first few trades but after that it just says invalid or unknown ticket. int a; int b; int total; double c; double d; int cnt; double firstsellprice; double secondsellprice;
Hi all! Check out the grail: Is the EA suitable for real, and if not, what parameters would you like to correct? Test on Eurobucks over 10 years
Hello everyone! Sorry to cause trouble to the people here. I don't know the coding. I am here to let some helpful people help me with my EA exit conditions and Trailstop issues? I got the formatted setting EA and 3 trading hours and weekend trading codes from Google search. I managed to enter the
Hi guys is there a code that can OrderClose but if the trade loses 100 pips or any pips it will ignore the OrderClose and stoplose at 100 pips I hope I cleared my question I need examples (code) if possible. Thank You :)
Hello all. New here. I've been learning MQL and doing some basic coding in the IDE. The short TL;DR version of my question: Is the MetaQuotes/MetaTrader IDE the ONLY way to code and build MQL solutions? Or is there any other way to do this? ---- The long version, if you want more detail. Just
Hello every coders Good day to you all. I need some idea help. As we know trendline object create use only int value and bar count. I get problem when I try to draw a trendline from previous day high double value to 4hour high double value in 1hour timeframe. Please see picture. I want to draw like
Hi everyone! Its been a enough time while i have been developing EA's they all work great in real and demos but when i try to test or optimize them in tester they only take 1 trade in the whole time duration. Why it is so i found not solid issues or error in this regard. Kindly guide me if someone