MQL4 and MetaTrader 4 - page 197

I need help in figuring this out. My program is looking at the two previous candles, checking if conditions are met then reporting on the current candle. My issue is it is not reporting on current candle it is reporting on the candle after the current. I have a sleep function of five second to make
My question is based on this lesson in the MQL4 book. https://book.mql4.com/variables/globals The code used in the example is reproduced for convenience //-------------------------------------------------------------------- // globalvar.mq4 // The code should be used for educational purpose only
Hi everyone, i created an indicator for mt4, the problem with it is that when i load it on the chart and close mt4, then restart it again, the platform does not connect to the server. I remove the indicator from the chart, restart mt4 and then it connects. Did anyone face this problem
hi guys i have 2 function function 1 and function 2 function 1 has has a formula that the answer of that formula is will be used by function 2. My problem is that function 1 and function 2 is calculating at the same time that is why function 1 is giving the wrong answer to function 2. I want is that
[Deleted]
  Slippage  (2)
Why does slippage happen and how do you reduce it
How to prevent new order to open at same price as Existing open orders.? New comment bool check_Buy() { bool Putorder=false; { FastMA = iMA(NULL,0,3,0,MODE_EMA,PRICE_CLOSE,0); SlowMA = iMA(NULL,0,5,0,MODE_SMA,PRICE_CLOSE,0); if ((Bid>FastMA)&&(FastMA>SlowMA)) int a=OrderSend
Forgot MT4 Profile password.Clicked - Forgot it? to be sent new password/password reset.Sent NEW Profile -zit. ???? and password for profile - zit. ??? Password sent does no work with existing MT4 profile only with profile - zit.As result I am unable to maintain 37 indicators/scripts/EAs in existing...
Let's say I have a main file (main.mq4) and 2 include files main.mq4 file looks like this: #include <include_a.mqh> #include <include_b.mqh both include files have the same enum defined, say enum FirstName { John, Mary }; When I try to compile the main file, it throws an error saying that the
How to change input values with OnChartEvent and a button in an indicator. I want my indicator to change one of it's user input with a button, then to recalculate everything in OnInit and redo all the loops in OnCalculate, so I create a button, then I change the values of the input in the
Hi, This might be a stupid question because I'm new to MT4. My broker said because I am using the client account, I cannot see what they trading for me. Profit and Loss is hidden. How can I know what that information. It really seems suspecious because when I ask them to show me, they said they
I have 2 pieces of data that I need to put into an array, then sort it. First I split the orders into two arrays the first array is for buys the other is for sells. When I do so, I am collecting the OrderTicket so later I can perform an execution on the order. The second thing I am collecting is the
Hi everyone! I trying to code a type of " Envelope " that would use ATR to adjust its "deviation" from the Base SMA. All Arrays present in the code have been Set as Index Buffers and are declared as dynamic. Here my attemp at it: int OnCalculate ( const int rates_total, const int prev_calculated
I want get angel trend line but it,s 0.0
Hello. I want to check how fast is my code. can I measure an indicator launch time in milliseconds
How do I disable the show object description dialogue during backtesting ? It keeps reverting back and plots unnecessary data
Hello! Once in a while instead of the normal menu of the MT4 strategy tester , which should be presented by SETTINGS | RESULTS| GRAPH | REPORT | JOURNAL i get this king of "optimization menu" only https://ibb.co/KWn7Kt1 [url=https://ibb.co/KWn7Kt1][img]https://i.ibb.co/gJYw40n/mql4.jpg[/img][/url]
Hello there, I seem to have a lot of time gaps on my charts and it is making things quite difficult! Ill give one example: on GBP/USD, the chart is missing all data from July 30th to Aug 19th THINGS I HAVE TRIED: Uninstalling and reinstalling the MT4 app. redownloading history in data center on all
I have this 7 value example A,B,C,D,E,F,G if value of A,B,D,E is more than 1 (or) if value of B,D,E,F is more than 1 (or) if value of C,E,F,G is more than 1 I mean when any 4 value out of 7 > 1 how can made this condition by mql4 thanks
Hello guys, getting crazy for this problem: //////////////////////////////////////////////////// extern double block=0.0047; extern double stepin=20; extern double stepout=4; int HIG=iHighest(NULL, PERIOD_D1, MODE_HIGH, 3000, 0); apex=iHigh(NULL,PERIOD_D1,HIG); int
hello could someone help me compile and fix these errors
I was just wondering if its possible to change the magic number of the remaining order , once its been closed partially ? for example if i have 1.0 lot open and its magic number is 140, now if this order is closed partially (0.3 lots are closed from original trade) then the remaining opened lot for
Please close this dumb question..... the last two lines, I should use poscount instead of i. I'm working on this code, using a CButton, my purpose: when new position (not including pending order) added to the current symbol, or stoploss changed in any of open position of the current symbol, this
I'm running MT4 on Windows 10. I prefer to close it when not trading so it's not using CPU/Mem, but if I've set the mobile push notification type of alerts on some of the charts I have open, does MT4 need to remain open and running all the time (even in the background) or are these alerts triggered
I did some search work, and the following code works with CButton font type: string FontType = "Calibri Bold" ; alertbutton.Font(FontType); However, my effort to make it an enum list failed: enum fonts { fntArial, // Arial Calibri Bold }; extern fonts FontType;
[Deleted]
Hello, How to add a day at a datetime variable ? My code : datetime dtDateTest = D'2004.01.01 00:00'; datetime dtDateTestPlusOne;  dtDateTestPlusOne = dtDateTest + ??????? ; Thanks, Tintin92
Hi, In OrderSend function (mql4), does the 'slippage' is in Pips or Points? for ex': symbol is EURUSD and I set slippage=5 in OrderSend, does that mean 5 pips or 5 points (which is 0.5 a pip)? Thanks
Hi- need help- my mt4 broker platform sets the day separation indicators from 12pm-12PM NY time schedule. I prefer my day separator to be set from 5PM-5PM NY Time. Is there a way to change this setting or must I use a broker who uses 5-5 on their servers? Thank you
[Deleted]
Hi everybody, I need help to solve the following issue I am struggling with.. The I use the iCustom function to import into an EA the values of the buffers of the " ShinNeAshi 2 " indicator, but I get only Zero value for all the buffers. I use the following code to call the first and second buffers...
Good afternoon dear forum users! I have reached a stage where it is necessary to objectively determine the degree of asset correlation for competent portfolio diversification and mismatching signals in different markets and sectors (not only forex), not a market neutral strategy, just different
Hi, my expert gives me the error 4051, so, there is some problem with the lot amount, but I could not fix it, can you help me out? The expert was working fine until I put this function into the order send. Thanks ticket=OrderSend(Symbol(),                          OP_SELL...