Download MetaTrader 5

MQL4 and MetaTrader 4 - page 189

To post a new topic, please log in or register
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 
Hello All,  how can we calculate Variation of the day before(%) Kindly need your suggestion.   Thanks In Advance Abhishek   
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...
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?
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...
  Round Number (14   1 2)
Hi everyone, I write a little code for getting round number of 4 digits. Example : 1.23455 -- > 1.2345 1.23456 --> 1.2346 my code is below. Please help me to check this code and tell me if i wrong. And, anyone have a better ideas? Please share it . Thanks double RoundNo(double price){...
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 .  
  MACD-2 (1)
Can somebody please point me towards an explanation of MACD-2 ?  I am familiar with the "old" MACD but would like to understand the MACD-2 formulae before I consider whether to include it in my trading strategy.  Many thanks. 
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 =...
Hi Everyone EDIT:  I did not receive any help on my original request, so I decided that it might be better to break it down in smaller sections, rather than ask all my questions in one go.  So I have edited this post and would like to start out by asking advise on this code, please:  The following...
I have discovered that when you download data from some brokers the data arrives in GMT 0 format - no matter what the DST of the broker is, e.g. European DST. I ran tests on this data and then another test on the data in my MT4 history file folder and it seems that this data is also in GMT 0 format....
Hi guys.   There are any way to save files on the Strategy Tester?   I try to save a report file after a test... at OnDeinit function but only works if running in Live mode... on backtest nothing saves...
I found that all my EAs, indicator, library and include files that I am developing have been deleted. I first noticed this over the weekday. Please I need help on what to do.
Hi all, "Ichimoku" indicator has a band plus three lines. I'm trying to hide the three lines(No. 1,2,5) and add three MA lines. The following is the code, but why that band does not show up in the chart? Could anybody please help? #property indicator_chart_window#property indicator_buffers...
The indicators I see are only within an Indicator. Can you have an indicator within an EA and, if so, how do you set up the buffers? Also how does the EA code sense the indicator signals?
With the code below, I want to show a rectangle frame around the latest 3 bars.   Who can help tell why the code can't show the "rectangle frame"?  I couldn't find the root cause. Also attached the print log below for reference.  Maybe you can copy the code below as an indicator for try too....
I use this code to open a pending order at 100 pips under current price, but it opens a market order at the current price please guide me double point = MarketInfo("EURUSD",MODE_POINT); OrderSend("EURUSD",0,.01,MarketInfo("EURUSD",MODE_ASK)-100*point,3,0,0,"",0,0,Green);