MQL4 and MetaTrader 4 - page 1190

-
I made the following code as a test and ran it on open bar mode in the strategy tester. int start()  {    int q=0;    for (int i = 0; i<10; i++)    {        q++;        Print(q);    }      Print ("---------------------------------------");   return(0);  } Most of the time it outputs as expected:...
New article How to Order an Expert Advisor and Obtain the Desired Result is published at mql5.com: How to write correctly the Requirement Specifications? What should and should not be expected from a programmer when ordering an Expert Advisor or an indicator? How to keep a dialog, what moments to...
  Use of libraries  (7)
I downloaded the file OrdersSuite.mqh from the code base here but am having some trouble using it. Looking at the code for OrdersSuite it itself icludes TimeSuite.mqh. I included the files in my script as below: #include "..\libraries\OrdersSuite.mqh" #include "..\libraries\TimeSuite.mqh" However...
[Deleted]
Does anyone have a correct base code to have a input on the colorchange according to the accelerator oscillator indicator??? Thanks in advance, Fly
HELLO ALL, IM A C# PROGRAMMER AND I WOULD LIKE SOME HELP TO PROGRAM THIS FOLLOWING EA: WHEN SILVER 1 HOUR CANDLE FALLS: X% FOR EXAMPLE, EVERY ONE HOUR CANDLE OF -1% ON SILVER... OPEN A BUY WITH A STOP LOSS. I WOULD LIKE TO TEST THE STRATEGY BUT DONT KNOW THE MATH AND COMMAND NECESSARY. ANY HELP...
I would like to import time of publication newses from web site: http://www.dailyfx.com/calendar/index.html?sort=dateDesc&timezone=GMT into string variable of indicator I 'm writing now... For example we have EURUSD currency pair, if ((today news == today date) && (currency == EUR) || (currency ==...
hi i want to know how to code for Pythagorean Theorem in mql4 if my equation is =sqrt((a^2)+(b^2)) and a=b can we do that by using : double MathPow( double base, double exponent) any help is appreciated
[Deleted]
Can anyone explain what has been changed to cause 4X the frequency of these calls. I am testing an EA on 'real' time, not back testing, but am now 'being allowed' 1 trade in 8 (average). The EA is the same, and was making 98 out of 100 trades correctly (win 70%, lose 30%), on platform 225 with IBFX...
  Fontsize option  (1)
Hello, Just a short question, I would like to add a font size option to the code bellow but I cannot manage to make it work, I tried the following code but it is not working: SetLabel("iProfit12", DoubleToStr (tu/MathPow(10,DecPts()), DecPts()),ColorOnSign(tp), eiX0Row, eiOffsetY+2*eiStepY,...
[Deleted]
Orderticket () is not retuning Empty_value after the last ticket has close...always returns the last ticket number. If Metattrader 4 is stopped, shutdown and restarted Orderticket () does not return the last ticket closed, the value is 0.. Should I create a buffer for the value? I am working with...
[Deleted]
I want to Use MT4 watch chinese stock, How I can do ?
I wrote a script with a pop up, and now I can't get rid of the pesky thing. I have deleted it from the scripts folder. I have shut down the platform. What is Chart Context Menu ? I don't see anything about shutting down scripts when I right click on the chart. Please... need help
[Deleted]
  Please help me  (1)
How can I register to practice with Ava Meta Trader Demo account. I need Login account and password to practice with the Demo platform
[Deleted]
Hi, I am new to forex and MT4, and I have one question: I am using en EA, which should close half of open lots on first target, but it doesn't. EA is working fine with other users, so I already contacted Oanda (I'm using Oanda MT4), but they couldn't help me. Does anyone know how to fix this? Thank...
[Deleted]
Hi, wondering if there is anything already in existence that I could use to auto set a fixed sl & tp on every trade. My entries are @ candle close instant and by time I set tp and sl price has moved on. Not a problem to edit if only one position taken but on a few different pairs simultaneously...
[Deleted]
I want to do something very simple for example: buy 0.1 lot EUR/USD if (EUR/USD > 1.40 AND EUR/GBP > 0.89) All articles are too much complicated I can't find a sample code which is as simple as what I just want.
Just so anyone who comes along later is aware, I did some work for Jordi Palazon de Andres in response to this post https://www.mql5.com/en/forum/132143 and haven't been paid. It was quite a bit of work and all had to be done in Spanish. He admitted that he wasn't explaining what he wanted very well...
Hi, I was trying to normalize the ATR between the values 0 and 100. 0 - to the lowest value and 100 to the greatest. I did the formula, but all the time, the indicator change to zero, and only the end start to move. I don' t have Idea why it’s happening. It only works when I compile it, but I need...
[Deleted]
  EMA_CROSS  (2)
Does anyone know how to make EMA_CROSS (one of EA strategies) a stop and reverse system ? I just want it to be all the time in the market, so there're no stops and no targets. Current position is being reversed once EMAs cross each other. Thank you Matt
I am trying to develop an EA and at the moment trying to get logical parts to work and just can't figure out what is wrong here. Perhaps someone could point me in the right direction First - the order does not close Second - GetLastError() appears to return 0 (zero) - i.e. the ALERTS @ 10800 &...
[Deleted]
How to define Lotstep to be 0.01 extern double Lotstep = 0.01 is it right that must be in begining define, or in calculation of optimal lot size. What is BalanceStep. Dynamic lot how to define to switch - true or false. Thanks
Can you add the InputBox() function on Meta Trader 4 (with new release) using this link: http://www.codeproject.com/KB/dialog/w32inputbox_1.aspx ???
In the tester, are the profits on the real account draining the deposit? No 100% confidence in the stability of the Expert Advisor? Quotes in the terminal stop? Install the service - mtonline and sleep in peace! If quotes do not come to the terminal, the Expert Advisor cannot control the situation
  Code not working  (2)
Can someone help me? The following code is a script that when I run, should place 2, at market price orders for 2 different currency pairs. But... It asks me if I want to proceed, but when I click the Yes, it does nothing. If I have the EURUSD chart open, sometimes it places that side of the trade...
[Deleted]
Hi, I am using a VPS, running win 2008 server with 2 gig of ram, and 2 x 2.4 ghz processors. I have written a C++ Dll that uses windows sockets to communicate with my software and passes instructions to MT4 EA via Functions. I have proved that my DLL gets its instructions in less than 1 millisecond...
Is it possible to write such a strategy, a non-syndicated strategy based purely on mathematics? I was asked this question to professionals and anyone who has any opinions. Mathematicians say that we should use the theory of random variables, more precisely Markov chain
[Deleted]
Can someone supply names of the Windows .dll(s) used to achieve the following functionalities?tia "Assistant The assistant makes writing the text of an Advisor easier. It automatically shows the scrollable "List Names" list after you enter several first characters of object names declared in MQL4. ....
Dear all i have indicators saving the historical data in .csv and .prn, but any one can help to make it to .txt (yyyyMMdd HHmmss;open price;high price;low price;close price;volume) Regards
Thought I'd create very simple EA to try and understand how file I/O operations work. Documetnation states the file should be :- terminal_directory\experts\files folder (terminal_directory\tester\filesif for expert testing) or in its subfolders. But I can't find a file anywhere. Handle - is...
Hello, I am looking for some help in building an EA that will manage my open positions. I open them manually so this needs to be only position closing EA. For example: I buy 1 lot - EA should close 0.1 of a lot at 5pips profit - EA should close 0.1 of a lot at 10pips profit and so on. But I should...