Download MetaTrader 5

MQL4 and MetaTrader 4 - page 175

To post a new topic, please log in or register
Hi Guys   I have an EA running but it is evaluating entry conditions every tick, and I simply want it to check only once per minute, preferably at the close of a 1 minute bar. On reading through the guides I guess this can be done by using OnTimer in place of OnTick, but I'm a little stuck now. Can...
if(iRSI5 <= 10)         {            //Up Arrow;            bool ObjectCreate(NULL,"Buy Arrow",OBJ_ARROW_BUY,0,Close[1],Low[1]);         } I'm having trouble getting this to work. I am very new to programming and would love some guidance in terms of understanding the ObjectCreate() function and its...
Hi Folks, I have used TS2 for many months but wish now to try MT4 - please where can I find instruction to "set up" the chart display - I simply require to show (e.g.) multiple Bollinger deviation levels in multiple time frames on a 5m chart... a comparatively simple task in TS2 but seemingly...
Hi,   Last time I was active coding robots (using MT4) (probably around 3 years ago or more), MT5 was starting to be used, and there were rumors that MT4 will soon or someday be pulled out or no longer be supported  (requiring upgrade of robots to MT5).   I wish to look into coding robots again.   I...
New article Graphical Interfaces I: Preparation of the Library Structure (Chapter 1) has been published on mql5.com: This article is the beginning of another series concerning development of graphical interfaces. Currently, there is not a single code library that would allow quick and easy creation...
Hi there Im not asking for code , just a point in the right direction: I need to define a changing variable, kinda hard to explain , so Ive sort've coded it:   extern int number= 'xxx';       // user input 1/2/3 . . etc . . . .       double value1 = OrdersTotal();    double value2 =OrdersTotal();...
Hello, whenever we open an order in metatrader it then is written to the log file. Whatever we do to that order it´ll be written in the log. So let´s imagine that my desktop mt4 is running, but for some reason I open an order with my phone, in the mobile mt4. Although the order shows in the desktop...
Hello, I have a computer running Windows 10, in which the code: string Terminal_Data_Path=TerminalInfoString(TERMINAL_DATA_PATH);  always returns a NULL string. This code works fine in other machines I have, namely one other Windows 10, and other is running Windows 8. I really can't pinpoint the...
  C# to C++ ? (4)
writing automated trade strategies on other software platforms in C#, how would I import and use these in MT4? Either that or convert them to EA? Is there help/documentation/steps for this procedure? thanks.
Hi there,   I am considering developing an EA that will periodically publish certain information of interest to a separate application (probably via WebRequests), but I have a big question..   My question is this:   1. Rather than having to drag my EA on to multiple charts, can I drag it on to just...
Hi there, I want to print how much time is left remaining for a bar to close, so I can open an order just before the bar closes. Print("Time left: ",PeriodSeconds()-TimeSeconds(Time[0])); But on the M1 chart "60" prints out for every tick. On the D1 chart "86400" prints out for every tick.  It...
MetaTrader Support, What is the the latest FXT Version and where can I get the latest FXTHeader.mqh for MT4 and MT5 platforms? Thanks Faisal
New article Market Theory has been published on mql5.com: A logically complete market theory that would cover all types and varieties of markets for goods and services, micro and macro markets like Forex, hasn't been available until now. This article covers the essence of a new market theory based...
In the following code i always see error     'MqlDateTime' - struct or class already defined  I cant see why?  struct MqlDateTime{    int year;           // Year    int mon;            // Month    int day;            // Day    int hour;           // Hour    int min;            // Minutes    int...
Hello guys, I have a question about recognizing supportsand resistance levels in MQL? My idea is this: -input int checkbars = X; (in order to make it easy, lets imagine this variable is 21 -if 21st bars´ highs on each side (to the left and to the right on the graph) areabove from the certain bar's...
Hi forum, when I do some analysis on the weekend and I need a tick for an indicator to update some objects or whatever, I just open the indicator list and close it. Obviously that causes the OnCalculate() to run once. Then the indicators which need a tick to update are being refreshed. Is it somehow...
Hi, I've been studying iCustom to implement a customized EMA indicator on a EA and I have a problem on changing the indicator style and label. Each time I call iCustom on the EA I would like to set the parameters to the EMA indicator: period, label and color. My intention is to put this customized...
Has anyone run into the same problem? I have 2 servers with one MT4 terminal each, both are identical and connected to the same broker. The only difference is that one server is placed in London and the other one  in Sweden. I have exactly the same setup on both servers, same EA, same amount of...
i want my mt4 program communicate with C# codes in different kinds of computers,X86 and 64bits so i decide to try Named Pipe,a solution without any DLL here's my mql4 code: #include <Files\FilePipe.mqh>CFilePipe ExtPipe;int OnInit(){//--- create timer   EventSetTimer(60);      bool bfirst=true;...
Hello, I have been devoloping my own trading plataform in C#. Is it possible to, from my C# plataform, get real time and historical values from metatrader and also send trading orders, receive account info, etc? I am using VS 2008 / C# / Net Framework 3.5. Thanks, Miguel
Greetings, I have a high resolution screen, and it does not display MT4 properly. I am using Version 4.0 Build 950.  Specifically the text in the indicator window is overlapping and so is unreadable. What can I do to fix this problem? 
I am looking for a system to extract out a signal from an email message, parse the data in to a text file or database and then have an EA process the order in MT4. Has anyone done this before or know where I may find such a system? All assistance will be greatly appreciated.
I am new to mq4 programming, I have a working indicator and working ea, I get good results in backtests however when I try to optimise certain parameters it runs the test and does not provide any results. Suggestions as to why this might be please? Regards Mickey. 
Hi all, I'm on a verge of bilding multi pairs EA and I found some problem. I've try to trace the problem and checking some codes but I'm, stuck on this. Is anybody know why ma1 and ma2 are resulting different?    int MAPeriod=100; int MAMethod=0; double clos[500];   for(int k=0;k<500;k++)...
Put this on chart.  No matter how far apart the 2 prices are, it ALWAYS draws a flat trend line.  Why? #property strict#include <ChartObjects\ChartObjectsLines.mqh>CChartObjectTrendByAngle myAngle;#include <Files\FileTxt.mqh>CFileTxt nFile;bool IsInit=false;datetime...
Hey guys, I am having an issue where EA will not execute order if I set the Use_FirstPO = FALSE.  Here is the code:
Hi there So I have managed to get the buffer values from my indicator into my EA using iCustom() , no problems and all is workinf well. Im struggling to pass inputs from the EA to the indicator , when the EA starts up. can someone just point me in the right direction thanks    
Hi guys, i have a problem again: I get this Error 4107 every time. The funfact is, that sometimes he opens an order with it. I searched in the forum and in the internet and found out, that i have to use NormalizeDouble(x,Digits), but this didn´t work. Then i normalized my SL and now i get an...
I want to switch from trading on demo to trading live, but want to have the demo-platform as a reverence.  Is there a procedure to "clone" a MT4-platform with all EAs, Charts, Settings ? Thanks in advance Roland