MQL4 and MetaTrader 4 - page 91

Hi I just get a problem when i have to use <stdlib.mqh> I import it in my code #include <stdlib.mqh> After compile my code its not any error about <stdlib.mqh> In strategy tester Journal i have got these errors : 2022.11.06 11:12:03.103 compilation of
I installed MT4 in a new machine. I copied one EA over from the first machine to the Experts folder in the second machine. Just the ex4 compiled code. No source. The EA ran for two days. It still does. Good. Then I decided to copy another EA. That EA won't work. I copied another. It won't work
Evening gents, I've been trying to do a calculation where it takes the values of an indicator and then creates a moving average from that. I can do this by using a horrible for-loop and use the shift function to add up and then divide by the amount I shifted it. ex: for ( int i = 2 ; i <= lookback;
Hello everybody ,I am newbie of mql4 coding, I need help please who could help, I want to code on My loggic: 1. pending order on highest and lowest speciafic time example , H1 candle highest and lowest from 4 to 10 am server time with pending distance from the highest and lowest. example 30 pip
[Deleted]
Hi everyone, the following two codes should produce the same result but only the second one works as intended. Someone can explain me why? int OnCalculate ( const int rates_total, const int prev_calculated, const datetime &time[], const double &open[]
Hi I create an EA using grid technic. the EA will open the first order according to a specific logic and then the grid technic will run after it. I have 2 problem that I faced: first one is that the EA failed to safe last open order if price is below last open order for buy order or if price is
[Deleted]
Hi everyone, I managed to build an indicator that fully fits my needs, unfortunately it makes mt4 massively lag which is quite a problem. Can someone help me identify why that's the case? Thank's. // Setup #property copyright "Eddy" #property description "Average multi-timeframe candle expected
Hi, My broker CMC Market did an update during the weekend, they add more products and update some symbol name on forex, metals and bitcoin. After the update my open orders moved automatically to the new symbol and closed any open order received from my signal subscription also no more signal update
Traders and programmers, Im looking for an EA with the specifics are below. -EMA cross (adjustable) 5ema to close being the lead and 5ema to the open -lots size (adjustable) -close trade and reverse on the cross with the completed bar. -any pair and time frame -4 different take profits with...
[Deleted]
Hello everybody, I'm a newbie on this forum. I've just started to develop my tools for trading in Meta Trader 4. I'd like to write a script that will prompt user for data, i.e. open a window to input data. For example: Script that will calculate max. lot size assuming x% risk of account for given SL...
Maybe my problem is unusual, but it's certainly complicated, and I admit I painted myself into a corner. I have an include file called AllMyFunctions.mqh. All my EAs begin by 'including' that file. Some EAs maye have ad hoc functions, but most functions and variables come from AllMyFunctions.mqh
Just wondering if this is the right place to put this or not. I'm wondering if there's a script/way to auto put a stop loss as soon as I open an order without manually putting it in (sometimes I just want to get in) but say I want a 20 pip stop loss as that's my 2% / trade max (just an example) is
[Deleted]
I am testing my EA on H1 frame, I get following errors: 2009.02.17 17:58:03 TestGenerator: unmatched data error (volume limit 1445 at 2008.12.16 09:00 exceeded) I also see Mismatched chart errors in the Strategy Tester Report. I understand the errors because I 've read other discussions on the site,...
void TrailingBuy(){ for (cnt= OrdersTotal ()- 1 ;cnt>= 0 ;cnt--){ if ( OrderSelect (cnt,SELECT_BY_POS,MODE_TRADES)) if (OrderSymbol()== Symbol ()) if (OrderMagicNumber()==Magic) if (OrderType()==OP_BUY) if (Bid-OrderOpenPrice()>TrailingStop* Point ) if
Hello. Friends, please tell me if I understand correctly this trade log and the situation that happened . Orders that from 00:57:42 to 00:58:42 were closed for a whole minute in the amount of 100 pieces. Do I understand correctly that the broker spent an average of 0.6 seconds on each trade to
Dear Programmers, I would like to send an e-mail with HTML codes. Normally, I ought to use two lines in the Header of the e-mail: MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-2 But, how can we edit the Header of the e-mail? Or is there any way we can use HTML codes...
Hi everyone, I want to find the latest swing high and swing low. I used this code to find it: double swingHigh = iHigh ( Symbol (), PERIOD_CURRENT , iHighest ( Symbol (), PERIOD_CURRENT , MODE_HIGH , WHOLE_ARRAY , 5 )); double swingLow = iLow ( Symbol (), PERIOD_CURRENT , iLowest ( Symbol ()
I ran an EA and had an interesting result. Not very good, but interesting curves. I have to study it more. Then I ran a second EA, two timeframes. It was worse. Then I ran third EA, two timeframes. Also worse. So I thought about something I should have paid attention to in first EA and ran it again
Hi guys, the command OtherBarZeroTime = iTime ( ChartSymbol (ID), ENUM_TIMEFRAMES (timeframe), 0 ); does not update at all when I loop around charts (30 charts). The time of the Zero bar is too early for non current bars. Sometimes it gives me the time of bar one of the chart. Any solution please
I don’t usually have access to MT4 on my desktop. Would that be possible to open a new trade on MT4 via C# or JavaScript over the web? My broker, ICMarkets, doesn’t provide an API. Thanks
Hello, Are there any problems with MT4 on Windows 11? I bought an indicator that I can't install on the MT4 software because the "market" tab doesn't appear at all. I don't have this problem on another PC with windows 10. Do you have any solutions? Thanks
Hey guys, can anyone please help me just edit this simple MQ4 indicator to send notifications to my phone when the size of the candle exceeds the set value. I will really appreciate it in advance
I want to put a cap on losses before I turn off the EA to avoid further damage on a clear bad day. Do you think this is the correct way to do it? starting up: double TodaysEquity = AccountEquity(); double InitialEquity = AccountEquity(); double TodaysLoss; double WorstLoss; int Today; int
I am not sure whats going on but does mt4 strategy tester cache previous backtests ? because I am seeing something strange in backtesting , I set parameters and run backtest on last 12 years , and it shows net return of let say 200$ , So I slightly change the input settings but it still shows 200$
Hi there, I'm running into problems creating an EA that runs through history, fetches a bunch of trade data and then exports that to Excel. The EA works fine except that I seem to be getting inaccurate data when I go back to around Nov 2021 in history on the M1 chart. I have setup MT4 to show max
Hello, please, I need complete this code. Any suggestion? thanks //+------------------------------------------------------------------+ //| fFractalSegmentSeriesAnalysis.mqh | //| Copyright 2019, Korotchenko Roman | //| https://www.mql5.com |
Hello, Possible to change the font size in MT4? The font in the chart are too smal. I use MT4 with WIn10 in a laptop with screen 15". Still not easy to read it. Thank you for your help
  FileOpen  (3)
/ void OnStart () { //--- incorrect file opening method string terminal_data_path= TerminalInfoString ( TERMINAL_DATA_PATH ); string filename=terminal_data_path+ "\\MQL4\\Files\\" + "fractals.csv" ; int filehandle= FileOpen (filename, FILE_WRITE | FILE_CSV ); if (filehandle< 0 ) {
[Deleted]
Hi all, I have a custom indicator and I build an EA from it. I would like to know is there any chance to put the indicator into the EA so I would be able to sell it via the market? Iam not talking about the iCustum function, I already use this to use it with my terminal, but nobody would be able to...
Hi all, Need your help, I have create a EA, but stuck on "Put limit / One Trade Only per Condition".... My target is, if a Condition meet EA will make order until take profit or stop loss, then wait until next condition meet. Hopefully you all can help me to resolve my stuck on this script.... Thank