Download MetaTrader 5

MQL4 and MetaTrader 4 - page 666

To post a new topic, please log in or register
I cannot get this array to display the values in order the first time the loop is run. It is supposed to display "0 cnt str 00" "1 cnt str 11" for the initial go round but instead it prints "0 cnt str " with no value for the arr[0] Then on the second round it seems to act as expected. I read...
How a expert can to read only last 20 history orders? Any idea?   for(int i=0; i<OrdersHistoryTotal(); i++)  {  OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);  {  Do some ....  }  } Now read all history orders....
Hello, I have following problem: For example, if I activate my EA I have in the top right corner not a smiley, but some other sign. Even so for some other signs. There aren't shown correctly. It seems like the font is not installed or something like this. Please assist.
Hi All, I am not an advanced MQL4 programmer and I am struggling to understand the proper use of the GlobalVariables() function. Very simply I have an EA running on four currency pairs and there are 3 key variables (Profit, Stoploss, Ticket) that I need to monitor for the EA to run properly. I have...
Hello! Please, somebody can help me to define "High(iHighest)" and "Low(iLowest)" since a specific time? I can find this in the topics: double highestPriceAfterBuy = High[iHighest(NULL, 0, MODE_HIGH, iBarShift(NULL, 0, OrderOpenTime()), 0)]; How could I say High(Highest) since a specific time, e.a....
I wrote a program before using hours() & minutes() to find session times.It worked correctly. Now I've a aproblem using th same, and documentation sems to say that it is the time my ea ha been runing. And hours(timecurrent()) & minutes is the one to use. In my program I want to close trades at...
hi guys, i thought about something like that: i wanna test wether in the last 10 bars there is a rage of X pips. i coded it like that but it doesnÄt really work for me. can you help me? for(int countback = 20 ; countback >= 0 ; countback--)   {   int high20Ago = High[countback];   int low20Ago =...
I write MT4 EA's, scripts and indicators for a variety of users around the world all of whom are running at different versions. Do you supply compilers at different levels so that I can recompile any updates for each of them?
  ' Oke' (1)
For faster trading a question. Is there a way to get rid of the confirmation screen of a closed order? When closing trades manual the ' oke' button is needed for confirmation before you can close another trade. But when you want to close a lot of trades there is much delay. Faster closing trades,...
Hi, Does anyone know the best way of setting up windows firewall on server 2008 R2 ? My VPS provider sent the following advice: As you are only running Meta Trader from your VPS, I would advise that you only leave the inbound ports open for RDP access (3389) and the ports used by the Meta Trader...
I have codeing a Expert Advisor with wich you can trade your metatrader account with your mobile phone. it work with every mobile phone wich have a webbrowser, i have a 3 years old nokia mobile phone wich i can use for it, it does also not matter if you have a symbian or android smartphone, this...
Hi guys, I recently solved the problem of using anonymous pipes to get the output from an external shell command and thought that people here would appreciate the source, see below. This will allow you to: string rval = CmdExe("echo HelloWorld"); rval will now contain "Hello World" Enjoy.
  PLEASE HELP (4)
I JUST PROGRAMMED AN EA,BUT IS NOT PICKING TRADE
Is there a way to remove or hide cancelled pending orders from the 'Account History' tab?
I am saving my quotes in an csv-file. Does anybody knows a way of checking the completeness of the data automatically? The qoutes are saved like this: 2011.09.29 17:57 5646 5651 5646 5648 I think I can do this with reading and controlling the file with an ea or with an script?? Does anybody knows...
Please help me !!! How to codes a "Expert Advisor" to draw a box with bars ? Begin 00:00 Monday End 23:00 Friday Box will shift x bars to begin box include y bar to end Please help me, soon! Thanks alot.
Hi, I'm triyng to write my first EA and I've already got the first part of it (entry points). Unfortunately it gives me various Zero Divide errors in Journal.. :( I'm around this error for days and getting crazy!!! :( Can someone please take a look?...
Hi, my expert gives me the error 4051, so, there is some problem with the lot amount, but I could not fix it, can you help me out? The expert was working fine until I put this function into the order send. Thanks ticket=OrderSend(Symbol(),                          OP_SELL...
Hi, I'm wondering if it possible to create an EA which disable's all EA's on a MT4 client? E.g. When the account reaches a 30% DD in the last 24 hours, the EA will switch off the Expert Advisors function of the MT4 client. I looked at a few EA's like the Swissarmy, MPTM etc. All have a global SL...
Ran into a problem with an array. datetime arrobjt[2]={ObjectGet(id,OBJPROP_TIME2),ObjectGet(id,OBJPROP_TIME2),ObjectGet(id,,OBJPROP_TIME3)}; Thought this would work but I keep getting a variable expected "OBJPROP_TIME1" is it possible to use a function in this situation? Am I missing something.....
Hello, I'm currently developing a DLL expert advisor. I have come across weird issues in MQL4 code, which I hope you'll help me fix. Firstly, ArrayCopyRates does not seem to work as expected. When I copy the bars to a two-dimensional array, I receive it in a reverse order in my DLL. The nearest...
if I want to get the AccountProfit() high point and store in an double profit;, how can I do it ? thanks extern double a=0; double pf=AccountProfit(); if(a==0)a=pf; else if(a>pf)a=pf;
  Sendmail (2)
My sendmail isn't working anymore. Worked fine up until a few weeks ago. was set to smtp.mail.yahoo.com.br:25 tried gmail, gmx & hotmail to no avail. Does anyone have sendmail working at a FREE email account? If so, what email site please... Thanks, Doug -
Hello...if anyone can help me pls...I want to add an alert sound to an indicator and I don`t know how...I tried a lot but I think I miss something :(...I want when a pattern it`s found to give me an alert sound...anyone who can help me please, I appreciate...THANKS IN ADVANCE...I have attached it...
Hi I found this script on this website somewhere a while ago and decided to give it a try now. The problem is it overwrites older data once it gets to a 101 lines. I dont know how to code in MQL but looking at the code I see length = 100 and the for loop will only iterate that many times since i =...
I have this indi that counts the number of bars since the last new high/low of a moving maximum/minimum of the close price: it could be used as input for a window function (that dynamically adjusts the look-back period of other indicators); Take a look at it: it is based on the #HH_LL indicator:...
  MA of the MACD Signal (13   1 2)
I need in my EA an Moving average of the Signal line of the MACD. Can I use IMAOnArray ?. Please giv me advice, thanks Dropje
Dear Friends, I have been searching for a mq4 file, which will draw the difference between +DI and -DI as an oscillator and put a its moving average on the same graphic, namely DIOSC indicator. Is there anyone who has this file ? Thank you in advance, Trappist
Problem: appears that Terminal not seeing 12th symbol in history file header. Ref: F1/Userguide/Tools--History Center struct HistoryHeader has "char symbol[12]; //symbol name" ==================== I create .hst with 12ch symbol name. Looking at created .hst file "!TicksGBPUSD9.hst" you can see...
I need some body can help me to revise my EA, I need to add some code to sent email from my EA about all position New and liQUID. thanks