Download MetaTrader 5

MQL4 and MetaTrader 4 - page 250

To post a new topic, please log in or register
Hi, i need expert’s help for an EA Thank you. Jé.
Can I change this: //+------------------------------------------------------------------+   //| Ensuring its a new candle function                               |//+------------------------------------------------------------------+   bool IsNewCandle()   {      if(Bar1Time == iTime(NULL, low,...
I created a script to write a file with some fields, and one of them is TimeCurrent(). But the problem is that it is returning to me a number that I cannot translate to date in other programs (e.g. R, Excel, Calc OpenOffice).  This a sample of the numbers that it returns:...
hi there, i need a Sleep() in a custom indicators start() function but it doesn't work. so let's say this is the indicator: #property indicator_chart_window int start() {     datetime start_time = TimeLocal();     Sleep(2000);     Print("elapsed: ", TimeLocal() - start_time);     Print(""); } if...
I am a new user at teh MT4 platform! So, when I try to launch a resident EA ( ex.: MACD or Moving Average ) into one chart, it don.t make trading. I'm new in CODE at MT4. I pretend only use the existing and tested EA's on the MT4. Someone can give me any lines to clear that ? Please ! Note: At the...
Hello, I would like to add 3 custom indicators to MT 4 mobile app, now the problem is i can't find the Indicators.map or any MT 4 map on my telephone. Can somebody help me out here. Its appreciated. Cados 
Hi, I need help to review technical indicators' values. As you know, we are able to get value of technical indicators like macd, stochastic, rsi. But I need to know how we can get buy or sell results from this values. E.G. You can see technical indicator table in below page of investing.com You see...
hi all i tried to write  my EA using Standard Deviation channel  but  i cannot  find any index  for  it's  lines only  time  points  but i need  price points please  i  want   the  formula  and  the  equation  that  used  to  draw this  tool  on meta trader  to be able to write  my own indicator...
Could someone kindly look at my code and tell me why I mustrefresh my screen in order to get my Lot_Size indicator to display? I do not havethe same issue with any of my other text writing indicators and they all followthe same construction. The only difference is they are based of chart data...
Hi, i'm trying to edit a mml indicator, the only thing i would like to do is to reduce the length of the horizontal lines as of now they are running across the whole chart. Which i don't really like as it can be sometimes hard to read . So i would like some help on how to code them to be shorter....
So I know when a stop loss was hit: what's the easiest way to halt trading for 1 hour when I know this?  I.e. OnTick fails on an equality statement every time for 1 hour after I discover a stop loss was hit? cheers 
Hello. I trade on Mac mini and i cant import any data to MT4,only data exported from mt4 and then import(and it useless) and when I only change anything in this imported file,save,i cant then import...what I do wrong? thanks I try to import yahoo spreadsheets to but it dont work :/
hi forum, i have a situation here. lets suppose i open a pending order, a buy stop order for instance. this order became a market buy order when the price is reached. it is possible in mql4 to know what is the spread at the moment the pending became market order and take actions like don't execute...
  Bug found? (3)
I have been 3 hours with this... trying to find an error on my code, but it seems is not the logic, anyone can explain it?      int i=0;        int j=1;     while(i<300)      {      Alert("i= ",i," ", iTime(Symbol(),j,i));      i++;      } When j==1, the Alert comes: 2015.01.20 17:22:18.392    2014...
Hey guys - before I go into the issue, is this the correct place to ask about MT4 issues? Or if not, could someone please tell me the best place?  Many thanks 
Hello Forum, I Hope you are all doing good! I wanted to communicate with Super Trend here's the link: https://www.mql5.com/en/code/8268 I want to put a Alert for my self when the cross happens and the current candle get solid, I described in attachment below. I have not a lot but a bit of mql4...
  mt5 hedging (1)
Does mt5 allow hedging? It never used to.    If it does not yet, is it something that has been mentioned as 'going to happen'?
I am new to trading and I am having trouble setting up my terminal.  I need some information on how to use it.  I hope someone can point me in the right direction.
Hi, I'm working on an EA and I'm implementing a trailing stop loss, since neither MT4 nor my broker supports that feature out of the box, I have to implement it programmatically by modifying a SL closer all the time. That leads to a lot of Modify calls per order. When I'm trying to use a tester to...
Hi, Can you kindly show me the way to get at least 2 years of past data on GBPAUD to test an EA? Thanks
Hi, I made an indicator which gives some information about the market, ie ADR, today's range, spread, swaps, remaining candle time etc. Now I added an economic calendar to it. It works pretty good, but there are two issues I can't solve: 1) My profile contains about 20 chart windows and the...
I can only pull up Forex charts on MT4.  I want to find out how to add indices, commodities and stocks to MT4.  Please show me how  https://dl.dropboxusercontent.com/u/9875484/Sup.PNG
I don't want to use AccountBalance() as I want to calculate the balance of different EA on a same account. I define accountBalance for the purpose. However how can I get a precise balance calculation after an order is closed considering commission and swap? Is this correct?   double...
Greetings, I am trying to place orders with different SL and TP levels.  However only the SL and TP closest to the market are being created. void OnStart(){   bool check = OrderSend(Symbol(), OP_BUY, 0.01, Ask, 3, Bid - 100 * Point, Bid + 100 * Point);   if ( !check ) { Print("error OrderSend " );...
Hello I have a function on my EA that controls the exiting of trades: void close(){      if(OrderSelect(SELECT_BY_POS, SELECT_BY_POS)==true)         if(GlobalVariableGet("period")!=Period() || !GlobalVariableCheck("symbol"+Symbol())){return;}                                   for(int i =...
Can someone please advise where I send a 'Request for Support' to Metaquotes. I have found and confirmed a severe problem with MT4 Build 765 logs not updating in MQL4 logs and Tester Logs  and had to revert my EAs to build 745 or earlier . The Metaquotes.Net site does not have a support request...
I remember at one point I was able to add something to the Tools/  Fibonacci/ Properties($?) to see the Price on the line next to the retracement/extension value. CAN YOU HELP? :-)
Hi, I open today a real account in MQL4.com but with the user name and password I can't login in my Metatrader 4 ...may I did somthing wrong?
Hello all! I am trying to add an image to the chart using ResourceCreate, but for some reason I am getting error 5002: "Wrong file name". ResourceCreate("ChartImage","\\Images\\image.png") I have also tried this code, with the same error: ResourceCreate("ChartImage","\\Files\\image.png") I've also...
Hi, I set up my DDE with excel, but i get different values in Data. Sometimes the value in one currency pair is different, too. Sometimes its written with "," and sometimes there are values with "." Has anyone an issue where this differences come from? Its hard to calculate with changing value types...