MQL4 and MetaTrader 4 - page 101

To post a new topic, please log in or register
Is there any function under MQL what we can insert into Expert Advisor or Indicator which refresh the current chart screen every 60 second without logoff and login or restart Meta Trader?
Hi guys! Context: I am currently using past data to do some profound analysis (Just started out using SQL) and of course using excel. Problem: Specifically, I am looking at NZD retail sales. It is clear that some years it is at 00:45 and other years at 01:45 ... and I am looking at summer months so...
I code a simple RSI alert, i use M15 timeframe, if the RSI value of last bar < 40, it display box and alert sound. I tried to code but it not work. Anyone could help me to fix it. Thanks so much! double MIN_LEVEL = 40; double actualRSI = iRSI(NULL, PERIOD_M15 , 9 , PRICE_LOW); void OnTick()   { if...
Dear fellow trader, Let's say I have a list of value {1,4,9,6}. How to get a random value from this list? Thank you very much!
Hi guys, I'm not a developer, but we have hired a development team to create some WordPress plugins for our website. The issue is they haven't worked with MT4 before. Ideally, what we want them to do is pull the Live Feeds from our MT4, and place the data on a widget. To get them started on the...
I had few VPS for my bots and even they were very low on memory (2gb) I could run unlimited number of mt4 terminals. I rented the dedicated server with 16gb of ram and it is limited by the total amount of ram. When memory usage goes to 16gb (around 25 terminals) new terminals just don't start with...
  Read Log file (3)
Hello Good time I'm going to access the phrases that by methods Print printed in the Mql4 / logs file is it possible by methods FileOpen, FileRead, ... access the log file in a way? Because Meta 4 does not have access to files outside the Mql4 / Files folder Can it be Locate the logs folder come in...
On a blue highlight all my trade record from April 2017 are gone and it show as Archived.  How can I get all my trade record back.  I'm not sure that it a feature from my Broker or from MT4. Thanks.
Please there is difference between  one alert per signal and Alert once per bar. Please any help on the code snippet for indicator to alert once per signal and not once per bar if(iTime(Symbol(),0,0)!=0){Alert();iTime(Symbol(),0,0)=0;} This is for alert once per bar. What of Alert once if only the...
I don't know if the expression "reset" is appropriate. The key is that I want to execute the same process as when I open the setting panel and click the OK button. Some programs, especially MTF indicators, often appear distorted at startup. However, if I do this, I can make it normal, as also you...
When I compile an .mq4  EA or indicator in the metaeditor it does not generate an .ex4 file. I have new Windows 10. I also cant download ex4 indicators or EA  files from various forex forums for some reason. It asks me to choose a program or app to download it. Any ideas?   Thanks. 
hi all,  when i optimize for my ea using strategy tester it gives a list of passes with profit and other results like drawdown. but most importantly it gives the inputs used in the pass. so when i use those inputs in the ea why does it not produce the expected profit? If anyone can help i would be...
I have a small problem with the addition of 10 charts in my indicator. In OnInit () I added this code to add 10 assets but first delete those open except the first one. Created buttons work but if I click to change assets, the 10 assets are deleted then added but then back to the second graph and...
Hi guys/&gals, Having a massive problem with my EA, instead of just opening 2 trades with the same magic number and then closing those ones at a set profit target my EA goes nuts and just continually opens the same trade over and over again until I turn off auto trading, I have tried everything and...
I have set an EA for sending positions with currencies , and that allows to import functions from the librairies . It checks the Hour and the Price Bid before sending Buy Orders with the selected currencies with the settings . Here is the EA :  #import "Conversion_Datas_To_Mql4.mqh"char...
  Add max order (6)
Hi I'm new to programming and have been trying to code some ea but struggling with getting max order. would be glad if someone can help. Thanks // External variablesextern int MagicNumber = 23310;extern double StopLoss = 0;extern double TakeProfit = 0;extern double TrailingStopLimit = 0;extern...
Hi, I made an expert and now run into a problem. In my code I use: if ((iClose(Pair,PERIOD_M1,1) < ArrayLevel[1][i]) && iClose(Pair,PERIOD_M1,0) >= ArrayLevel[1][i]) this if-statement was true and actually it couldn't be true. I know this because of my logging: the arraylevel[1][i] => had the...
What code can I put in my EA that will completely Restart it.. Like reload EVERYTHING... Reload the externs, init()and start() functions .... Aswell as reload the chart... Thank you very much
Hello, I have spent a lot of time working on an EA for someone and I am worried that when I gave him the ex4 file for testing, he might decompile it and then won't pay for the work I have put on to it ! I'm not very sure that it's even possible. Wikipedia says that the new builds are impossible to...
  Help on TL!! (2)
Hi all, I set my Trendline Channel aka Equidistant Channel on MT4 but it is bothering me that it looks awkward as shown on the picture i have attached. How do i have the Channel Rays only extending on the Right side instead of the Left too? thank you!!
I want to check if total orders are not zero, then, if buy order exists, I want to set the variable "buy_order_exists" to "1" if sell order exists, I want to set the variable "sell_order_exists" to "1" But my code doesn't update the variables when the orders are exist.  if (OrdersTotal () != 0) {...
iCurrency
Hello, can you suggest decision how to manage large data and trade with Metatrader 4. I have an EA that records in csv file in Metaeditor/File folder quotes and some variables of symbols in Market Watch. However when recording data becomes very, very large - above 1 million of rows, and if EA just...
Hello, I need to add displacement between the price and arrow 
does any one know why i am getting this error and how to fix it, this is the line, extern int    ProfitTarget         = (AccountEquity()*1.01);
Comments that do not relate to the "Please help with one trade per day code", have been moved into this topic.
I created an OOP-base for Indicators and EA, so that I don't have to use iCustom! What you see is a very simple Mom: Buff2[b+1] = close[b+1] - close[b+1+PER]; Buff1 receives the values that are calculated by the OOP-base. As you can see, the OOP-calculated values are pretty much the same as the...
Hello Why every time I do a strategy tester always appears in the image below. Is there something wrong my Ea.?
  MT4 Vs MT5 (2)
Why do most of the Algo startup using MT4 and not MT5 ? what is the main advantege, still, in MT4 , and why do you still using it ?
Hi guys Why i don't see my EA  indicators  on the chart in backtest ?
Hi everyone, it's my first post and I hope I am not in the wrong forum. Problem is, I just downloaded mt4setup,exe from metaquotes.net but it does not start on my system (Win 10). Same problem with MT5. In the event log I see errors but they do not contain any specific message, maybe someone can...