Download MetaTrader 5

MQL4 and MetaTrader 4 - page 416

To post a new topic, please log in or register
I ran into something of a bug while writing some code to round spread data to the nearest multiple of my choice. See below: //Given that (in the variable declaration)://extern double DMultiple4 = 2;if(SignalID == 4){   RefreshRates();   D = ((Ask-Bid)*100000); Print("DMultiple4 is "+DMultiple4);...
Good Day... Is there any possibility to recover spreads from previous bars? Thank you very much..
Hello Does anyone know when it will be MetaTrader on Windows Phone? Boss
Hello, I'm sure the fault is with me, but I was searching for the answer to this - seemingly simple - question for some days now and I still don't get it. I thought maybe you could show me a solution: Let's assume we want to open a single trade position. Given are the following parameters (important...
Hello, Is there any way of placing orders asynchronously in MQL4? (that is, at any time other than a new tick notification in start() function) What I'm trying to do is to place a buy stop and/or sell stop orders within 2 pips of the price just before a news release. I don't want the order to be...
  double order (9)
While testing my EA on a demo account, I noticed that I got an order executed twice in the same second. Although I have a check before using OrderSend to make sure that I do not currently have an order open. What would you suggest I do to prevent this?    total=OrdersTotal();      if(total<1)...
I was wondering if someone cold tell me how would program the following I want the ea to scan back the bars atleast a set value but lot more then a set value to see if there equal to or more of pips of a set value.
Hello. I am developing an EA that must work in more than one chart window due to that some part of the program analyzes the trend in one time frame and other part of the program does the same but in other timeframe. The aim is to avoid contradictory trades, because may be that in a 5 minute frame...
How to code to get MIN and MAX openprice of all "Open Trade" Hi guys, I would like ask if anyone know how to code the function to get the MIN and MAX open price of all ongoing running trade of Symbol(), assume I got no magic number. E.g I got 4 trades of EUR USD running 4 open trades 1.3040, 1.3077,...
Hi, I have created CSV file that consists of such structure. I have about 10 000 rows with this type off data. datetime;string1;string2;string3;string4;string5; Semicola separetes each other column so that data would be readable. What I want to achieve is to be able read that data and do some...
Hi, I need to store the ticket from a short order while it's running... but my variable LastTicketShort_Scalp doesn't work? Please Help        int LastTicketShort_Scalp = 0;       int LastTicketLong_Scalp = 0;          for (int za=OrdersTotal()-1; za >= 0; za --)    {      OrderSelect(za,...
Hi everyone, I am sure I am missing something basic here but after all online search still not sure why this would not work... I am trying to read iStochastic values from multiple time frames (i.e. M5,M15,H1) and then store them in global variables for later use. I am testing the cose on M5 chart...
Hello. I have 2 MA on my chart i.e. 50 and 100. And I wish that each time when they cross each other Arrow have to appear on chart (down arrow/up arrow). If 50 is above 100 then it have to show up arrow and vice versa. I have attached the template file please tell what changes i have...
When i start mt4 in the journal tab i get the error message 2013.09.16 00:27:04 '198699': Signal - different specification of symbol NZDUSD., signal provider has minimal volume 0.01, subscriber has 0.10 (and a few other similar messages) I was wondering, does this mean the minimum lot size of the...
Good Day... I would like to ask if RefreshRates will be enough to be used on an EA if a certain symbol is updating or not and it will give an alert if it is not for more than 5 minutes... Or there any functions that is precise to know whether a certain symbol is updating or not. Thank you very much....
double SL,TP,onePip; int Ticket; onePip = 0.0001; if( (Symbol()=="EURJPY") || (Symbol()=="AUDJPY") || (Symbol()=="GBPJPY") || (Symbol()=="USDJPY") || (Symbol()=="CADJPY") || (Symbol()=="NZDJPY") ) { onePip = 0.01; } //check if price match       double currentPrice;   currentPrice =...
I don't know if I am the only one that has an issue with this. I find that whenever there is a long line of code included that is wider than my screen, I then have to keep scrolling left and right in order to read the rest of the page. Sometimes, especially with articles, this can be very irritating...
How would I progam the current value of stochastic say 45.500 into a variable and how would I program the past value of stochastic into a variable and then the diffenrence between the two into Variable. What Im trying to do is program and buy or sell action when there is a x value different...
Hi guys.. I need some help here. Previously I ask a similar question and i got this reply below.. however when I try compile, there quite a lot of errors as the variables are not fully declare and I not sure if its work below. Just to ask how do I create a code or function that do the following....
Hello I have an indicator and am trying to get it to work in my Ea. 1st I tried to use I custom no buffer values then I inserted it into my Ea and nothing. Need some help thanks. Here is part of my code....
Hi guy. Is there anyway for me to obtain the instantaneous value of the bar?
!!!! with your help, i managed to place data within a user-defined array, but still do not know how to use all of the data ... my array has the price data of 100 bars, How I can make an average of these data?
Hello Guys, I coded password on my expert advisor but i want to change the values to be seen in the input window as asterisk. The "link101" should be (*******) extern string PIN ="-------"; if(PIN != "link101") {Alert ("Invalid PIN");return(0);}...
  silly problem (3)
can someone tell me why this loop doesn't store the data? int h1; int h2; int h3; int b1; int b2; double t1[]; b1 = iHighest(NULL,PERIOD_H1,MODE_CLOSE,700,1); b2 = iLowest(NULL,PERIOD_H1,MODE_CLOSE,700,1); h1 = b2; h2 = b2; for(h1=b2;h1<b1+1;h1++) { for(h2=b2;h2<b1+1;h2++) { t1[h1] = iClose(NULL...
I'm fairy new to programming EAs. I've part complied an EA which uses MT4 to open a trade for Forex pairs. To exit the trade I would like to use the output from an Indicator on Tradestation on the corresponding Forex future. i.e. trading from MT4, stoploss set in MT4 EA, tradestation signal closes...
  Please Help (12   1 2)
I can't see why this function doesn't work. //Creates strings like these:// yyyymmdd,hh:mm,o(4dp) ,h(4dp) ,l(4dp) ,c(4dp) ,Volume// 20130829,20:25,33.2050,33.2060,33.2030,33.2040,20string MakeInfoString(string symbol, int period, int Bar){        string Strline = TimeToStr( iTime(symbol,period,...
first of all, sorry for my bad English. I have problems storing data in a user-defined array using a loop ... I can store data in each position of the array by itself, but I can not store data in an array using a loop. someone can show me how to do it with an example? thanks.
Hi, is it possible to put my own picture / bitmap / icon on the metatrader chart?! Or a alternative possibility can I load my own font to write on the chart? Thank you
double iHi;double xHig;double iLo;double xLo;double out=10;int i;int Range_n=4;double lotsize=0.1;double stoploss=1;double takeprofit=100;double bsl;double btp;double ssl;double stp;double magicnumber1=1111;double magicnumber2=2222;double k=0;static double giamua;static double giaban;double...
For my EURUSD charts, the price gapped to around 0.1120 yesterday. At the time, pressing refresh didn't help at all. I have a script that uses iClose(), iOpen(), etc. to write the chart info to file, and it also got absurd prices. Today, after pressing refresh, the chart data became more plausible...
1...409410411412413414415416417418419420421422423...1245