Download MetaTrader 5

MQL4 and MetaTrader 4 - page 713

To post a new topic, please log in or register
Hi, I have EA like this: intinit() {  long_running_function_that_access_timeseries_array();}intstart() {  while(!IsStopped()) {    RefreshRates();    another_function_that_access_timeseries_array();    Sleep(50);  }} Suppose that init() takes 30 minutes to complete. After that MT4 will call my...
Hello ; I would like the distance between 2 trend lines (the height) so i begin to create a program which can get the object property like (price and time) . My problem is I can take those information for one trend line but not for the one (there is to) as you can see in the pictures, I draw 2...
Hi, I have an indicator calling iMA() to return a moving average. If I use MODE_CLOSE in the code, it uses the LOW prices. If I use MODE_OPEN in the code, it uses the CLOSE prices. I can tell this by setting the period to 1 and seeing what prices the moving average tracks. Here is the line of code I...
I am using ATR TRAILER EA, but there is a problem in ordersend() its not doing trading but when I am testing it using strategy tester its giving me right result. please help me regarding this. I am attaching my code file with this . please find attachment. Thanks in Advance.
//+------------------------------------------------------------------+//|                                                    Parabolic.mq4 |//|                      Copyright © 2004, MetaQuotes Software Corp. |//|                                       http://www.metaquotes.net/...
My MetaTrader 4 was working perfectly when I was testing the megabreaker EA, when all of a sudden the pips stopped moving. All charts seem to be still, permanently. What could the problem be? Red
Hi I am looking for a sample code or how to implement Student-T Test http://en.wikipedia.org/wiki/Student's_t-test or Wicoxon Test http://en.wikipedia.org/wiki/Wilcoxon_signed-rank_test in my EA in order to improve the probability of my expert advisor.There are some great articles about...
The i-Regr indicator (as well as numerous others) calculates the linear regression of X bars and displays it on the screen (green line): At each new bar the index buffers are cleared and re-written with new values; the indicator repaints (as it should). When it does this all prior regression values...
Hi I was creating some code and was wondering about Bid price when it is between 2 points. For example if(Bid < High[5] && Bid > Low[1]) Print("Bid is between High[5] and Low[1]") or something similar ? Any problem with this ? Or should I be using MODE_BID ? Or perhaps none of this ? Please advise...
  Indicator getting corrupted (56   1 2 3 4 5 6)
All, I have developed an indicator which runs fine for the first 16 hrs or so, after which it gets corrupted and starts to draw lines all over the chart. I am also checking the value of IndicatorCounted() and its value does not become negative when I get the corrupted lines. I do not want to...
Hi, i need help cause each time i order, it's always come out signal timeout message. what does it means? is it related with connection, as i know the connection is ok? is the proble in client or in server? many thank's..
I have this function to look for line crosses to initiate a position. The problem I have is that when I add the EA to the terminal it immediately takes a position. I'm not sure what to add so that it waits until a subsequent line cross before it initiates a position. int Crossed (double line1 ,...
My previous posting titled "Multiple instances of EA" hasn't got an effective solution, Here comes another one... After attaching an EA to a chart, the EA will initialize itself every time you switch intervals (for example, M15->M1). By "Initialize", I mean it resets global and static variables and...
Hello, I have a few questions about running EA in MT4: If I want to run an EA on many currency pairs, do I have to drag-n-drop it on every chart? Is there a simple way to run it on many pairs even if some of them do not have chart displayed on the terminal?When an EA running on multiple currency...
I use different profilesso I can get EURO charts or JPY charts etc in groups. In one set of profiles Ihave 8 charts, each on a different timescale. This all works well apart from abug with a custom indicator. When I change profiles the custom indicator inquestion does not get its init() re-run and...
Hi All, I'm getting a 130 Invalid stop error in Production but not in Test. I'm sure its something I'm over looking, I'm looking for any suggestions before I begin debugging it. thanks K
I am new to the forum and am looking for an existing expert advisor, or someone who can design a script to alert the trader on crossovers between the following EMAs: 13EMA, 21EMA, 34EMA. An alert must sound whenever the three EMAs crossover each other. Specifically, when the 13EMA is under the...
Hello, Perhaps someone could explain to me, why the MQL4 tester deliveres sometimes an error 138 "requote", when my EA tries to close an Open Position. I thought that the tester uses "local" date and doesn't comunicate with the broker. Thanks
Hi I was experimenting with candle patterns Although this is not a true bullish engulfing candle it is what I defined it as. if(Close [2] < Open [2] && Open[1]<=Close[2] && Close[1]>Open[2])       Print (Close[1], " Bullish Engulfing Candle "); But after I put this in an EA and run the tester, I...
In the second week of the competition, the Expert Advisor of Sergey Nikitin (VNIK) trading on two currency pairs EURUSD and EURJPY got featured on the very top drawing away from the rest. Multicurrency Expert Advisors always attract attention in the Championship, especially those that show good...
Hi all, when set the index style for a buffer to draw histogram it always start at 0 (zero) and draw the histogram line until the current value - up or down. Is there a way FOR EACH BAR to set a different inital value then 0 (zero)? For example at bar 0 histogram goes from 1 to 3, bar 1 goes from...
I am getting a smiley face but nothing happens. If I run the same EA on the same time period in the strategy tester I get expected results. Broker was no help as they don't provide any support for MetaTrader 4 except providing an account to run it on. Thanks in advance for any suggestions. K
Dear all As mentioned in subject, I know an EA can use icustom to get data from an indicator, but is it the same between EA and another EA? Wing
No possibility of not being able to use robots. Is that true?
I just upgraded to the new build and I am missing the white "price" line across the chart that shows the current price. I don't know what it is called other than that but the older MT4 has it and I need to figure out how to make it show on the new charts. Please help...
Does anyone know of an ea based on BBMACD??? Thanks a bundle
I'm exporting data to CSV files for later use. It's possible to export data from instruments other than current chart. But when I don't have opened charts with other instruments the new data isn't fetched and only old is accessible. I don't wanna open all those windows to get it updating. Is there a...
for(int s=14400;s>1;s--){                for(int t=0;t<21;t++){           h_cur=High[s+t];           if(h_cur>highest)               highest=h_cur;          }         for(int y=0;y<21;y++){           l_cur=Low[s+y];           if(l_cur<lowest)               lowest=l_cur;          }...
I am using a EA that trades on RSI signal. I am using it in a demo account, but some orders are not executing some times what may be the reason for it. Note: The same EA has worked for the same currency pair several times, and as this is demo account the Account balance is $100K. The...
Hi everybody, is there a variable that returns the opening time for the last bar? Thank you!