Download MetaTrader 5

MQL4 and MetaTrader 4 - page 69

To post a new topic, please log in or register
  Is the File Name Wrong? (15   1 2)
When open a file, get the error "5002". Use "Print()" the file name,  got "C:\Users\900077605\AppData\Roaming\MetaQuotes\Terminal\3222703EF955C10T7523LJHO8922D2\Info.csv" Could you please help tell what is the name problem? Thanks! 
Hi all, I've noticed a number of posts on this but no definitive answer to the questions about adding symbols to MT4. I am motivated by the need/want to integrate all my technical analysis into MT4 (stocks and forex). Naturally I have forex data and symbols from my broker but would like to add end...
Hi there,  I am busy creating an EA that uses 55 EMA and the price close. It must perform some action when price closes above/below EMA 55. I have tested this and it sometime behaves in an unexpected manner. I am not sure if it is my code or there's just a bug in iMA function itself. The specific...
Hello, I'm writing an EA and i have a problem here: This is my Send Order: OrderSend(Tien,ÓP_SELL,Lots[y],NormalizeDouble(GiaS[y],Sothapphan),3,z,NormalizeDouble(GiaTPS[y],Sothapphan),NULL,0,0,clrNONE); And this is my SellStop Order OrderSend(Tien,OP_SELLSTOP,LotSs,NormalizeDouble(GiaSs,Sothapphan)...
//+------------------------------------------------------------------+ //|                                     SwingMan HiLo Activator2.mq4 | //|                                                         SwingMan | //|                                               soc607@t-online.de |...
This little script: void OnStart()  {//---   int waitMinutes = 60,       waitSec     = waitMinutes*60,       waitMSec    = waitSec*1000;   while ( Minute() < 48 ) { Sleep(30000);    Comment("Starting Eieruhr.. ",TimeToString(TimeCurrent(),TIME_SECONDS),"  m: ",(string)Minute()," => "...
Does anyone know how mt4 calculates CHART_PRICE_MAX and CHART_PRICE_MIN ?
Hello friends, I want to create a login form in an EA, what is the right form to do that? Thanks for your help
Hi friends, I am doing an EA for my personal use and I don't know why when I put an order instantly this order is quit.... I am using a demo account. Code: //+------------------------------------------------------------------+ //| Script program start function                                    |...
Hello I try to have many ordersend at same time with same price but when use for or while loops it's not work properly ! and without loop when i use ordersend function on ontick set order with every thick with different price like photo How can i do it ? And other problem How can i break EA after...
Hello guys, I made a square with a white background with the following code // functionint CreateBackground (string backName, string text, int Bfontsize, int LabelCorner, int xB, int yB){           if(ObjectFind(backName) == -1){         ObjectCreate(backName, OBJ_LABEL, 0, 0, 0, 0,...
  All USD pairs (35   1 2 3 4)
Display major currencies average movement in one chart. Excellent to plot with dollar index and compare correlations and/or strenght. Russian language but options are very simple. However, a traslation would be great. The picture do not show the name of each currency but there are in the chart.
is there a way to set semi-transparent color indicator's line? i used this but none of these  work: ...... SetIndexStyle(1, DRAW_HISTOGRAM , STYLE_SOLID, 1,  StringToColor("0, 0,127,0")  ); SetIndexStyle(1, DRAW_HISTOGRAM , STYLE_SOLID, 1,  0x00FF1234  ); SetIndexStyle(1, DRAW_HISTOGRAM ,...
Hi, Please help to solve problem while "webrequest=200 Too many requests" This function is too complicated for me. I only can code bots. I can't figure out what's wrong. It was working for years before. Not anymore : ( string GrabWeb(){   string cookie=NULL,headers;   char post[],result[];   int...
Hi, I have several MT4 terminals trading at the same time and am trying to export RTD (Account Balance, Profit etc) from each terminal to Excel so I can monitor in one place. I know that Pepperstone and some other brokers provide this as an EA but they are unfortunately not my broker. And I think...
Or is it just Wine? Seems to me the time in the Experts Tab is ahead by about 60 seconds compared to the Account History. This makes fixing EA errors harder than it should be.. Any fixes for this? So far just ignoring the time warp .
   string FileName = "c://report.txt";   int handle = FileOpen(FileName, FILE_TXT|FILE_READ);   if(handle!=INVALID_HANDLE){      string MyString = FileReadString(handle);      FileClose(handle);   } Can anyone spot why this code does not work, I get an invalid handle, the file does exist. Steve
Hey Guys, I wrote this Indicator showing Support and Resistance Lines in the 15min which works perfectly fine. I also want to see these lines in the 5min TF. But when I switch to the M5 TF other lines appear which are not supposed to be there.. Can someone help me out, please? extern int...
Hey, I wrote an indicator displaying me lines at highs and lows. Unfortunately, I get hundreds of lines as all bars of the chart are processed. I would prefer if the indicator just processes the last 500 bars or so. For the sake of convenience I've just inserted the part with the resistance. Can...
Hi, I have a couple issues/questions with my indicator, also feel free to add any tips. I'm not a programmer by profession and new to mql4. - the main issue is that none of these are showing at all, I put these in the function OnCalculate as they have to move dynamically:     ObjectCreate("top 0.7...
Hi friends, Is there any way you could suggest to get the datetime of the upcoming candle that are going to be formed later? for example on the daily timeframe (D1) I want to find the datetime of the candle that is going to be formed 20 candles since now - 20 working days later -  Is there any...
  File path (1)
Hi,  Easy one for you guys I am sure, can you give the file path to write a txt file, I have tried loads and I'm just not getting it :-( Steve
I would like to use Mt4 910 version. However, when I open the MT4, it cannot connect to the server and said my MT4 is "old version". How can I fix this problem?
Hello all, I'm new to this forum and MQL4 in general. While practicing with the code, I have created a custom signal based on Bill Williams' Alligator indicator for EA testing purposes (Jaws 13/1, Teeth 8/1, Lips 5/1). But it looks like I have forgot something... Can you help me? The code for OPEN...
I am a Newb to MT4 and MQL. I have placed eight EAs on one MT4 instance. I developed these EAs on a 30m time frame, but I am using a 1m Timeframe for testing purposes. I receive the error "Cannot change existing previous pending order with ticket: 1984613, reason: 1". ("Program has been deleted from...
Overnight, Microsoft updated my Windows 10 to "June 13, 2017—KB4022725 (OS Build 15063.413 and 15063.414)". This morning, my stored Accounts information has disappeared from my mt4 client terminals. I work with 3 mt4 instances, over a dozen accounts, live and demo, and several brokers. Usually I...
Hi friends I gathered the following EA from other codes. But he is not trading. What could be the reason. Can you help me. Thank you extern int stoploss     = 150;extern int takeprofit   = 500;extern int slippage     = 10;extern int Magic = 4166;extern double Lot = 0.01;void OnTick(){   for (int...
It is pretty easy to get the current spread on a pair, and it looks something like this in my code. string infotext2222  = " Current Spread: "+DoubleToStr((Ask - Bid)/pips,1); However, I also want to display the spread that I "paid" or that existed on my last trade. So say I took a trade at 11:00...
In my EA I am getting the error message, "possible loss of data due to type conversion", for both occurrences of "prevtime = Time" in the EA code below: if(Time[0] == prevtime)                  return(0);        prevtime = Time[0];        if(!IsTradeAllowed())                 {...
Hey guys, I coded an indicator that creates Support/Resistance lines. Now I've tried to create an EA which opens orders directly when market price touches a Support/Resistance lines. For some reason the orders are not being placed directly at the lines. Can somebody help me, please? Here's my code...