Download MetaTrader 5

MQL4 and MetaTrader 4 - page 231

To post a new topic, please log in or register
I am pretty sure that for some time it has been possible to send orders to an ECN broker with a stop loss as long as it is from an EA. I was getting the invalid stop error on the latest EA that I am working on and just couldn't find the problem. I changed the code to send the order without the stops...
Hi, I know it is possible to set more than one opening rule to open a trade with the use of multiple "if's", but how to assign a closing rule to each opening one? Please, treat me like an amateur. I mean, some simple template would be welcome. Thanks. 
Hello,   We have few clients which are using VPS. There is a problem with the machines : all of them consumes 100% of the resources. I have investigated this issue and found a few processes mt4setup.exe and mt5setup.exe which consumed 99% of the whole VPS resources. Of course, there is no setup...
Ever since this new MT4 build is released in June,I am having issues installing and running my custom indicators.   I save them in MQL4  folder of indicators but when I run my mt4 there cant be seen in the custom indicators tab,same is the issue with templates,I save them in templates folder but...
my function call line in start() is   LN(1,"+ 100", H, White); my function is void LN(double n, string nm, double val, color CL) {    string NN = nm + DoubleToStr(n,0);    ObjectDelete(NN);    ObjectCreate(0,NN,OBJ_HLINE,0,0,val);    ObjectSet(NN,OBJPROP_COLOR,CL);        string nmL = NN + "_Label";...
Hi, I will code your strategy for free, just post it here in detail.   About Me, I've been professionally developing indicators and scripts for quite some time now. I also do trading.    What's the catch? Obviously coding is pretty hard work. Actually I am starting a blog where I will post results...
Hey, It seems that I keep getting an error: "System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutra" This doesn't occur when I run the process from a configurable application that can contain:  <dependentAssembly>         <assemblyIdentity...
Hi is there any way to use current object as a parameter? JavaScript have "this", what can i use to make same functionality in MQL4? For example: class Container {public:        Object *object;    double m_Price;    MyData(double price) { m_Price = price; }    double getPrice(){ return m_Price;...
Jasper Ng Jie Ming
I would like to modify the existing Heikin ashi indicator to draw an arrow whenever there's a colour change (signifying a change in trend). But it's not working and I cant identify the problem. Please help and thanks in advance!
Hello, I have an indicator which purpose is to paint candle if volume goes above certain value I have tried to modify it so that it only process the last candle (the currently forming and not closed) The purpose is to paint it the same as my background so that it hides the candle that is not yet...
I am working an a indicator that gives me certain information about the currencies I trade. One part of this is the amount of Margin Used to open a trade. Market Info(NULL,MODE_MARGIN REQUIRED) works just fine as long as the "quote" part of the symbol is USD but it does nothing if USD is the "base"...
Hello   How we can compare double value ,when double value is nearly equal to zero? Please Help. 
Hello, i programm a own Backtester and want to implement a genetic optimization. Now i want to know for the start, how in Detail works the MT4 Optimization? How big is the Initial Population, which kind of Crossover is/are used, how high is the Mutation and so on? I have the infrastructur for the...
In MetaEditor on EA source I start debugger via F5 In ClientTerminal a new chart is displayed. I need .tpl of my choice... Same idea as when use StrategyTester, I name the .tpl of choice with the .ex4's <fname>.tpl  I've done the renaming in all dirs having .tpl's but no joy. I've searched total...
I fail to convert the Vidya MQL5 indicator  https://www.mql5.com/en/code/75  to MQL4. I endup with no compilation error but indicator does not display on chart. Please note that the MQL4 indicator https://www.mql5.com/en/code/9191is an old version which does not include the Chande oscilator....
Hi,  I'm trying to install the following indicator (https://www.mql5.com/en/market/product/4370) but can't find it within the platform. Do they get deleted but not updated on the website? 
Hi , my code bellow fetches information of a wrong Order ID. What happens is when I have a pending order open for order ID 1 for OP_BUYSTOP for example and then afterwards another pending order for order ID 1 for OP_SELLSTOP opens and i want information for the sell stop , i get information for the...
Hi,  Im a student who have just started trying MQL4. Im having issue finding the function to count the number of open position. Also, confused with the jargon so there may be some error in the words.   Lets say the price is 80 and i put an pending order to buystop at 90. To count the number of...
Sorry , I got this form internet I thought this is free EA.
Before I start, is it possible any broker might read this thread and try to interrupt or disrupt my strategy if I trade while using EA? Because what I'm about to reveal is a strategy with 10 pips per hour (90% winning). If by any chances those broker can interrupt any EA, its better I do it manually...
I am new to this forum. I have a question on the Sleep command. I am using the same EA on 9 major currency pairs. I use the 5-minute time frame. Here is a simulation of the actual situation: 1) I click on a MessageBox that creates a EURUSD Buy position and subsequently put it to sleep for 5 minutes...
Hi, guys I have a custom indicator and need put it in EA code. Can someone help me? The indicator code =====================================================================================...
Need help how to stop server from freeing Will run fine for days Message usually is required resource unavailable but using less than 16% of memory. I am using rackspace multi cpu server  and have assigned 1 cpu per Metrader instance and it has slowed down number of freezes I believe Any...
Does any one know how to get hold of fxBinaryOptionScalper{8} If so please respond,first to respond $100 
HelloI'm not sure if this is the best place to add this, but I've noticed with the iPhone IOS app for MT4 that if the app is momentarily unable to see the broker server then any indicators that I've added to the charts are returned to defaults - i.e. no moving averages in the Main Window and just...
Hi, To Anyone who can shed some light:  I'm plotting the Highest High and Lowest Low in Line style buffers,  the number of bars look back is counted since the last crossover of close price moving above or below a 100 SMA. The problem is that on the current bar(most recent) the buffers flare up and...
Don't know if it's my broker, but, this should not be possible. I am getting an array out of range exception when attempting to access Close[0] - Don't mind the issue per se, but, the lack of ability to trap the exception so that the EA doesn't crash is not acceptable. Thought maybe it would happen...
Hi,   I want to ask, how I can implement a function for starting a timer after a certain condition like   If buyCondition is true, then wait excactly 60 or defined seconds and check the buycondition again after the seconds are over. I used in my code function like TimeSeconds(TimeCurrent()) which...
Hello Guys I have an EA and that going to open trades at the signals call. I want to add some pips more than price that signal coming. For example indicator signal is at 1.10000 price and EA try to open position on that, BUT i want add some more pips above for BUY signals and below of SELL signals....
I'm using some code in an indicator to generate synthetic instruments for currency indexes, and storing the results in an offline chart. Once per minute, the code syncs data and writes new bars to the offline charts. The indicator then references the generated bars from the offline charts using...