MQL4 and MetaTrader 4 - page 23

To post a new topic, please log in or register
Hello, I want to close order on next day certain time, I have a mql4 files which close on the same day certain time. Which part I must change? How to change to next day certain time. Thank you       if(istradinghours(close_time_hour,24,0,0))...
Hello Programmers I am looking for the EA to do a very simple thing. Just open Buy + Sell after every new candlestick. That's all i need Thanks
Hi friends, I'm going to show the lasterror both on the terminal using the Print function and export it to the file. First I used GetLastError() on the Print function and then again use it on the procedure of exporting it on the file when I found out that the GetLastError return zero on my file and...
  MQL4 Flow Chart (13   1 2)
Hi, The big oldlumbering tortoise has poked his head out occasionally to check out the terrain for quite some time now and has finally acceptedthe inevitable! At this time of the year at least I can now claim that ‘molassesdoesn’t flow very fast in the cold weather and barely moves at all!’ So I’ve...
  Simple Ichimoku Scalping (56   1 2 3 4 5 6)
Simple Ichimoku Scalping. It is some variation of the settings of the Simple Ichimoku System. This Ichimoku template was improved onto Simple Ichimoku Scalping. On this thread you can find this Simple Ichimoku Scalping for Metatrader 4 and Metatrader 5. Installation for Metatrader 5. - download...
Hi there, I am trying to get indicator data from a chart other than the one that I have my EA/Indicator/Script active on. The problem is, if that chart is currently open, the data is accurate. However if that chart is closed, the data is more often than not inaccurate. I am testing this using the...
if (counted_bars<0) return(-1);   if (counted_bars>0) counted_bars--;   limit=Bars-1;   if(counted_bars>=1) limit=Bars-counted_bars-1;   if (limit<0) limit=0;     for(i=limit;i>=0;i--)   {      hhb=Highest(NULL,0,MODE_HIGH,dist,i-dist/2);      llb=Lowest(NULL,0,MODE_LOW,dist,i-dist/2); Hi all,...
Hello everybody, can anyone help me to know how to get the Actaul value of the currency, at the time of the economic calendar event? Thanks a lot in advance
Hi I tried many ways to calculate the stopLoss and takeProfit but could not get it write. say I want the stop loss to be 40 pips away and the take profit to be 20 pips away. the below code failed and many variation could not fix it either, I need to consider the forex pairs when jpy is present as...
Hello friends, I need that mi indicator close operations. I don´t where ir the error 
Hello! I'm working on several projects and for some of those I require to be restricted without having to buy/rent a server to make kind of a every 6 hours check for license numbers or something like that. I came up with a fairly simple idea, and I just wanted to get opinions on that and other...
Hi, I want to know information for open orders by currency in all charts. I have running the same EA in several charts 1. EU chart (TF=M1) 2.GJ chart (TF=M15) 3.UJ chart (TF=H1) 4. EU chart (TF=H1) 5. GJ chart (TF=H4) I can use    OrderSelect(cnt,SELECT_BY_POS);       if(OrderSymbol() ==Symbol())...
Dimi.A
Hi Mladen and friends, Just sharing an interesting indicator I've been using to trade reversals on the 15 minute charts called Vertex. The reversals are pretty spot on so far but the "TMA bands" repaint. I think there's a lot of potential in this indicator, it just needs some polishing up. Mladen,...
Hello All, Has anyone had success opening terminal.exe from the commandline using switches to open a chart window and also specify an Expert Advisor to run in the chart window on opening? Could you potentially point me to other posts/how to's pls.. Thanks, Ian
I tried all of the objects listed: https://docs.mql4.com/constants/objects and even tried a triangle with 2 points in the same spot but it doesn't work. The code looks like this: for(int z = 0; z < OrdersHistoryTotal(); z++) {      OrderSelect(z, SELECT_BY_POS, MODE_HISTORY);      if (OrderSymbol()...
Hi everyone, I am new to trading and would like to understand how to import live data from MT4 to Excel (Excel 2013). I have looked through other threads posted on here previously that advise on this and still cannot seem to make it work. Thus far I have tried to simply import a bid price to excel,...
Hi, I have written an EA. But I don't know how to restrict the EA only work on a specific computer? I don't want people to pass my EA to other people without getting permission from me. Is there a way to achieve that goal? Thank you very much.
  new bar formed? (23   1 2 3)
Hello, How we know when a new bar is formed, please? It's because I would want to stop analyse, trade...ets when something happened in the last bar. Regards Chris
//+------------------------------------------------------------------+//|                                            Price Close Alert.mq4 |//|                                        Copyright © 2007, SMJones |//|                                            sjcoinc2000@yahoo.com...
Hi Guys,  Im wondering is there a way to limit a HLINE  to show only for the last  10 Bars(for Example). I need something like that in a project of mine, Ive searched, but didnt find anything. Id appreciate the help!  Best Regards Stan
Greetings, I am keen to use this indicator (tdi-with alerts) seems much support for it has ended. Issue 1: Right at the end error says: 'not all control paths return a value' I dont know how to resolve this. Request 1: Add function so that indicator works only at first tick of new bar, not all the...
Hello everyone, I busy making a EA that uses MA5 and MA10. i want to do a OrderClose function when the cross back so . (PMA5>PMA10 && MA5<MA10) BUY order opens. (PMA5<PMA10 && MA5>MA10) BUY order closes and SELL order opens. Can you please look at it and help me out int MagicNumber=1200;void...
Hi Friends, I am trying to write a piece of code to check whether the previous candle body is completely outside of Bollinger bands. So far I wrote the following.   double bolinger_upper_band=iBands(NULL,0,mPeriod,mDeviation,mShift,mAppliedto,MODE_UPPER,1);   double bolinger_lower_band=iBands(NULL,0...
hello, so i included the #include <stdlib.mqh>   i wanna use the std::map from this tutorial http://thispointer.com/stdmap-tutorial-part-1-usage-detail-with-examples/   but when i trying to write std::map<std::string, int> mapOfWords; i getting errors ...   please can somebody help me that uses c++...
Hello, dear users! It is necessary to read the messages in the terminal from alerts. Reading log files is not suitable, because there messages are updated with delays. I understand that it is necessary to use libraries, I'm unfortunately not strong in this. Perhaps someone has ready examples or...
Hi I am new to linux but I have managed to run MT4 on Linux and so far I am happy because it consumes less resources. I am having trouble when restarting the MT4, the attached EA suddenly disappear from the chart. I have to re-attach it again and it's not looking good for the trade if there is open...
New article Common Errors in MQL4 Programs and How to Avoid Them has been published: Some older programs can return errors in the new version of the MQL4 of compiler. To avoid critical completion of programs, the previous version compiler handled many errors in the runtime environment. For example,...
I'm trying to get the stop loss in my EA to auto set behind last three bars can someone show me how this is done, when complied I get error, not all control paths return a value how do I fix this? I have some idea that I have to use: return StopLossBuy;
hello, I made a simple EA that reads from a CSV and opens the orders, there would be the possibility to check if there are already open orders for a symbol?
Hi, Could someone give me tips for this ? 1. Two MT4 are running on the same PC. (each terminal is working on a different account number but of the same broker and account type) 2. I want to create a Expert Advisor code that runs on one of these terminals (let's say 'terminal A') and monitor/operate...