MQL4 and MetaTrader 4 - page 592

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
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...
[Deleted]
  EA not trading  (3)
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    
[Deleted]
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 
Hello All,  how can we calculate Variation of the day before(%) Kindly need your suggestion.   Thanks In Advance Abhishek   
[Deleted]
I'm new to MQL and MetaTrader 4, but I want to read a CSV file and draw the values I've got into the chart of the Expert Advisor I'm working on. Every file has the form: ;EURUSD;1DATE;TIME;HIGH;LOW;CLOSE;OPEN;VOLUME2014.06.11;19:11:00;1.35272;1.35271;1.35271;1.35272;42014.06.11;19:14:00;1.35287;1...
[Deleted]
Here's the first article: <Link removed> The pair has broken minor trend line resistance 1.0880 and jumped till 1.09062. It is good to buy at dips around 1.08950. I'd be curious to learn from any of you - what do you think of this trading idea for EUR/USD?
[Deleted]
why do my EA not send buy stop order successfully? Can anyone help me please.  here's my code:   extern double Lots=0.01;extern double CloseProfit=10;double pips;double InitialAsk;double InitialBid;///////////////////////////////////////// in pipsextern string UpperBuyStop;            //    extern...
sorry for bad english I want to take notification 1 time.   int start()  {      if((Hour()>=0)&&(Hour()<=23)){int TradeTimeOk=1;}else{TradeTimeOk=0;}double RSI_M15=iRSI(NULL,PERIOD_M15,14,0,0);double RSI_M30=iRSI(NULL,PERIOD_M30,14,0,0);double RSI_H1=iRSI(NULL,PERIOD_H1,14,0,0);double...
Hello. I'm writing this since I'm having problems sending the rates to an external DLL. I've tried the two different methods using ArrayCopyRates https://docs.mql4.com/array/arraycopyrates - The first thing I've tried, and it has worked, is working with rates defined as "double rates[][6];". The...
Please find attached an indicator that does nothing but display the values passed to OnCalculate - and a few other values from functions common in indicator development. Question:  Why, when accessing  volume[] or spread[] do I get an  'index out of range error'?  Are these values not supported in...
hello.   There is any way to show all results from optimized tests ? Including the omitted tests ?   Example: Lets try a test that has 100 combinatios... but only 80 where displayed, and 20 testes where discarded.   I need to show these 20 discarded tests. 
Hi, anyone could help me with my EA that close parial open trades when it reach a X% in profit and move SL to BE, but when lot is nod divisable by 2 like 0.03 its only moves to BE and don`t close partially. extern double  Percent_Break = 1;// Risk Reward to close partialextern...
  A question  (3)
Hi you folks are the experts here. Would it be possible to make a simulator so when the market closes over the weekend we can use out MT4 to forward test getting the data from the past like the strategy tester. you know what i mean  it would be like you could reverse the MT4 and do your testing just...
I have installed many times MT4 & also MT5 : same problem.  Pheraps there is some set up that i can't erase somewhere . Please Help. Thank you in advance .  
I've got 5 charts open, 200000 bars in chart. struct MqlRates  {   datetime time;         // Period start time   double   open;         // Open price   double   high;         // The highest price of the period   double   low;          // The lowest price of the period   double   close;        //...
Dear Community, I am quit new to back testing with MQL programming but still very fascinated about the possibilities! Can anyone help me to get started with the requirement of testing several strategies at the same time including an export to CSV file afterwards? I was thinking about a "master" EA
Hi there, My EA has bands that don't match the values of the bands in an indicator I'm using to test my EA. The indicator displays the bands as below: The upper band value of the previous bar to the current bar is:   It's code looks like this: double upper[], middle[], lower[];extern int period =...