Download MetaTrader 5

MQL4 and MetaTrader 4 - page 16

To post a new topic, please log in or register
On my Pc W7 pro this code runs without problem. On a VPS W2008R2 it causes a "zero divide". Even broker, account different. How would it be possible that "iClose (pair [i], FastUnit, FastNumb-1" return zero? #property copyright "Copyright 2015, JLF"#property link      "https://www.rototo...
does it matter if i use High[0] or iHigh(NULL,0, 0) in EA ? why iHigh is widely-used way?
How i can stop Duplicate Transactions in EA  Please help me  bool OrderIsActive(int ordertype) {   for(int i=0;i<OrdersTotal();i++) {         OrderSelect(i, SELECT_BY_POS, MODE_TRADES);         if (OrderMagicNumber()==MagicNumber && Symbol()==OrderSymbol() && OrderType()==ordertype)...
I've created an EA that works very well in backtesting.  However, I have a different program that I use altogether which I use to signal GREEN/RED.  Green is when I consider the market conditions favourable to go long stocks.  Red is when I go to cash. I would like to incorporate the two systems...
  Error CryptDecode (24   1 2 3)
Hi, just trying the new CryptEncode and CryptDecode functions. Everything is working as expected with CryptEncode. However when using the provided example with a slight modification (converting the char array into a string and back to a char array). I am getting the 4029 error....
Hi all, I have been trading for a while but programming is still very new to me. I have created an excel sheet with mt4's dde sample. I now want to display the excel sheet that i have created on my website, but i need the live updates to run as well. Any suggestions how to do this?
I have created a EA that sends tick data to a custom calculation module in my server and receives the calculation's result. I want to plot this result into the graph from this same EA. How should I approach it? All charting and plotting examples point me to write an indicator but it is not...
Hello All! I am trying to add an indicator from my laptop to the mql5/mql4 web terminal. What steps show I take so that I can use my indicators on the mql4 web terminal. Thank you, Marshon
hi friends i have a problem im using MetaQuotes demo account and i dont how add oil and some of stocks i need ur help 
Hello to everyone, I have a small problem using this code: //--------NewBar------------bool NewBar()  {   static datetime lastbar;   datetime curbar=Time[0];   if(lastbar!=curbar)     {      lastbar=curbar;      return (true);     }   else{return(false);}}//--------NewBar------------ that helps me...
I spend a lot of time marking up my charts. Occasionally my computer will crash or mt4 will close unexpectedly and the next time i load mt4 either all my chart markings are gone (back to initial settings) or a previous saved copy of my work will be there (from the last time mt4 was closed normally)....
  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()," => "...
Hi.. Below is my ReadUrl() function to read remote http sites... and works fine! But it only works with valid valid content.  If an error occurs(404, 500, etc) there is no solution so far. So i need to detect HTTP errors. Anyone have any idea on how to do this? #define READURL_BUFFER_SIZEX...
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...
1...91011121314151617181920212223...1249