MQL4 and MetaTrader 4 - page 876

Good Day... Is there a way on how to count how many lines are there in a text file? for example the text file contains... EURUSD GBPUSD EURJPY USDCHF after reading the text file using FileOpen it should return 4 as it contains only 4 symbols or 4 lines... Thank you very much...
[Deleted]
  iHigh value  (4)
Im confused. I wrote something in loop script and encountered a wired thing. if(iHigh(NULL,0,xi) == levelnum) {ZV = true;} it does not work. first check: if(1.32 == 1.32){ZV = true;} It works. if(1.32 == levelnum){ZV = true;} it works. if( iHigh(NULL,0,xi) == levelnum){ZV = true;} It does not
[Deleted]
Hi, when MT4 or the internet connection were closed, we have gaps in the .hst files. When MT4 or the internet connection open again, my indicator encounters these gaps. What can I do in the indicator source code, to make MT4 fill these gaps? At the moment my only workaround is to reload the...
I have been coding a function to display previous trades on a chart,  in the same way that dragging a previous trade to a chart does. I want to keep my function versatile so I am making it configurable while at the same time making the defaults match what MT4 shows by default, so some of my function...
[Deleted]
My friends, I am not a professional MQL programmer, but I have been doing it for quite a long time and I am very interested in developing trading robots. I am happy to implement your ideas for FREE, my only motivation is love of coding and desire to see interesting and unusual trading strategies
Dear forum members :) Ready to write FREE EAs on your strategy. I apologize to everyone if my words offend anyone, but most people think that only their strategy leads to grail and therefore do not share ideas. I think a satisfactory result may be obtained after a wide discussion. That is why the
Can anyone explain to me why this happens? double result = 15/100;Print("15/100 = " + result);Console: 2013.09.17 15:01:25    Test EURUSD,Daily: 15/100 = 0.00000000
  Back test  (7)
I am new to all this how do you back test an EA ?
[Deleted]
Hello can .. can you tell me if there is something that I think MetaTrader 4 trade redirect to a website as a graphic? all par minutes is `updated? or what was earned today?
Hi, I know the question has been asked few times but I cannot get the same amount as OrderProfit() by doing this (when this is a profitable position > 0) profit = MathAbs(price - OrderOpenPrice ()) * OrderLots () * MarketInfo (Symbol (), MODE_TICKVALUE) / Point;profit += OrderSwap () +...
  Droid Maxx  (1)
Hello All just bought the new Droid Maxx and installed MetaTrader 4, and received the following message "Device is not Supported" it looks like Samsung is not the only phone having support issues. Any thoughts out there?
  EMA Color  (4)
Why does the EMA in color have the line breaks? How can i have it all continuous like the one i have in ThinkorSwim? Also how can i change the line style and width at the same time? It seems with alot of these indicators you can only change one or the other. Please and thankyou.
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);...
  Spread History  (1)
Good Day... Is there any possibility to recover spreads from previous bars? Thank you very much..
[Deleted]
Hello Does anyone know when it will be MetaTrader on Windows Phone? Boss
[Deleted]
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...
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...
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...
  Variable problem  (6)
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....
[Deleted]
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...
  To administrators and moderators  (76   1 2 3 4 5 ... 7 8)
Maybe it's time to end the smoking room with political topics? We could do with non-political ones too
  STOCHASTIC VALUE  (1)
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 beetween
[Deleted]
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....