MQL4 and MetaTrader 4 - page 176

Hi I was created a thread about static datetime in here: https://www.mql5.com/en/forum/362972 and successfully working on it. The code from the previous thread detect and make the EA to works only once a bar since I put it on the first of the strategy. Now, I want to use the newbar variable in the
if want to open at open of bar ,use Time[0] can I use iTime(0,PERIOD_H1,0) for H1 Bar open time
I am trying to understand the working under the hood of iStochastic. I loaded the native MT4 stochastic oscillator on a EURUSD D1 chart on an MT4 terminal from IG (IG demo account). I also downloaded the same data from history in excel Finding number 1: With below settings: I can see that the Main
Hi, I would like to have on MT4 a main window with say H1, and on the side two smaller windows with H4 and D1, for the same currency pair. Something like in the picture below. But what I am struggling to understand is how I can make it so that if I change currency pair all 3 graphs will be updated...
I want to make below code (difine) bool LIST_EURUSD; bool LIST_GBPUSD; ...... many pairs string list =[EURUSD,GBPUSD, .....]; for ( int W= 0 ; W<list.length; W++) { bool "LIST_"+list[w]; } Something wrong with it. Can you point it out
I have a demo account and have downloaded MT4 on my desktop and the MT4 app from Google Play. The info is not the same though. I cannot see trades done on one platform on the other. How can I get them to mirror each other
Hi everyone, anyone know how to do this? I have an .ini file set up to open MT4 with my chosen pair/template etc. What I would like to do is be able to open additional charts from command line, using different .ini file, without having to close MT4. So I would: use command line to open terminal with
I just finish de MQL4 book and i was traing to make a simple EA, it didn't go well. I tried to backtest it overnight, with little to no result; then i tried to test it with 5 currencies on a demo account and it opened up to 35 operations per currency. I have check the code several times and have no
Hello, I need a little help with the attached indicator. I would like to get sound and notification alert only when a new arrow shows up. Because now I get notification on every new candle after the arrow if everything is still green or red I would be very grateful if somebody can help me with
  CScrollV - MT4  (5)
Does anyone out there have a clue on how to get this to work, inside a CAppDiolog box? I'm trying to make several dialog boxes, inside a main dashboard box, but I need to get the main Dashboard to scroll up and down. Does anyone know how this thing works? When I put my smaller dialog boxes inside
If I rent a VPS from Metatrader, does any kind of support come with it if there are problems or if I have questions, etc? If so how does that work? I don't see any mention of support (or pre-sales support for that matter) on their web pages eg https://www.metatrader4.com/en/trading-platform/vps
https://book.mql4.com/variables/arrays I am working through this example in the book. The website code is reproduced for your convenience however it differs from the download code stringarray.mq4 I believe both examples are erroneous. Is this book even a good way to learn MQL
[Deleted]
I created a custom indicator but it will not call alerts from offline renko chart. Can anybody help me to resolve this? It will call alerts fine on live chart. The alert code is below. void myAlert( string type, string message) { int handle; if (type == "print" ) Print (message); else if (type ==
Total leaders won 3267 pips during March (yes ... again more than 3000 pips ). More information here: https://www.mql5.com/en/forum Best regards
I am rewriting my EA to use MQL4 newer Graphic Controls and I am having difficulties getting the EA to respond the way I would like. The first problem is I would like the CAppDialog to Align to the right side of the charts as that is where the price action is. The Second issue is with CSpinEdit I
I have copied signals in MT4. The trader open new trade at 00:16am and the spread was over 500pips at that time. Stop Loss was reached and MT4 reopened the trade immediately. Is there any method to disable/ limit copy trade when the spread is too high? Or any way to disable copy trade in specific
I build this indicator whitch has the task of buyng when the ADX is greater than 30 and the candle is bullish and sell when the ADX is greater than 30 and the candle is bearish , but it does not work and I cannot enderstand why , can you tell me where i went wrong ? Thank you in advance for the
Hello i am trying to read a file from the common directory but its not working Here is the code that i am trying : input string FileName= "15767168" ; string Directory= TerminalInfoString ( TERMINAL_COMMONDATA_PATH ); void OnInit () { ResetLastError (); int file_handle= FileOpen (Directory+
is it possible to look at certain heiken ashi candles in mql4. I tried calling the indicator and then using the i close function for the specific candles but using i close it take the default candle sticks, im not to familiar with buffers so im not sure if that is thee solution. Any help is much
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