Download MetaTrader 5

MQL4 and MetaTrader 4 - page 141

To post a new topic, please log in or register
Hello all, If you are not aware about it, you have to know that Metaquotes is pushing hard for traders and brokers to adopt MT5. They are currently developing MT5/mql5 to fill in all the missing features that prevent the switch to MT5 from MT4. MT5 allow now to hedge/lock in a similar way to MT4...
Hello, are the ticks while running the Strategy Tester 1) automatically generated or 2) are the same as delivered by the data provider (e.g. FXCM)? Thank you!
#property copyright "Copyright 2016, MetaQuotes Software Corp." #property link      "https://www.mql5.com" #property version   "1.00" #property strict extern int period1 = 50; extern int period2 =150; void OnTick() { bool bill; bill = rsi(); if (bill = 1) { ordersendbuy(); } else if (bill = 0) {...
Hi, I have a few orders open for different currencies, how can I find is there an open order for certain Magic Number?
Hi, has anyone heard of brokers restricting the 'OrderCloseBy' function? I don't want to waste time opening an account with a broker (such as IG Index) that does not allow this function. I would effectively be crossing two lots of spreads. I was wondering if anyone knew if this is a broker...
New article Applying fuzzy logic in trading by means of MQL4 has been published: The article deals with examples of applying fuzzy set theory in trading by means of MQL4. The use of FuzzyNet library for MQL4 in the development of an indicator and an Expert Advisor is described as well. The...
New article Deep neural network with Stacked RBM. Self-training, self-control has been published: This article is a continuation of previous articles on deep neural network and predictor selection. Here we will cover features of a neural network initiated by Stacked RBM, and its implementation in...
  Trailingstop EA won't work (40   1 2 3 4)
Hi Everyone.  I cannot get my EA to work properly.  I am running it on 10 different pairs/charts simultaneously.  There seem to be two problems: 1.  It does not trigger the Trailingstop most of the time.  Sometimes it works, though.  I think the problem lies with my OrderSelect, but cannot resolve...
I was practicing to make a simple E.A.but the following errors occurs . "        '}' - semicolon expected                             " "        'else' - illegal 'else' without matching 'if'       "  Can anyone please point out my mistake in the following program  and make the correction. #property...
Hello As there is clearly only one correct answer to the question, 'How many pips of profit does my current trade exhibit?', I'm interested to see the most efficient way of coding this. I could work this out from reading, but I'm concerned about missing a vital point, and wondered if someone would...
is it possible to give an array as a return value, like this? double[] function23(...){   double erg[3]; ... return (erg);}
  Simple experts (261   1 2 3 4 5 ... 26 27)
This thread will be used to post simple expert advisors ________________ The experts that are going to be posted here are not going to be complete trading systems - after all, building a trading system is much, much harder than the majority of traders want to admit it - but to post code for simply...
Hello For a while I've been using the following lot size calculation in EAs, and more recently in a script I can drag onto a chart for it to do the lot size calc for manual trades automatically.  My trading partner said, 'wow and it handles situations where the base currency is GBP and the pair for...
when i send my expert advisior ex4 or mql4 to another folder or another device code dont work in tester , what should i do ? any idea ?
Hi, I would like to create two Lines showing the "opening bar" for daily time frame in the lower time frame The problem with the following code I'm not able to change "color, width, ...) also I don't know if it update auto or not. More explanation in the attached image. Any help will be highly...
About Alpari historical data. so i called them a couple days ago for the time used in historical data and they told me all the time in historical data is in EET+3 and EET+2. is this true? I look up on a lot of website and said time they adopt has changed since 2012.... Im stuck since I'm trying to...
Not sure if this is a known problem but I'm unable to set the OBJ_ARROW_BUY and OBJ_ARROW_SELL properties. string obj_name = PREFIX + " Arrow:" + TimeToStr(Time[i])ObjectCreate(0, obj_name, OBJ_ARROW_SELL, 0, Time[i], Low[i] - (WindowPriceMax() - WindowPriceMin()) / 15);ObjectSetInteger(0, obj_name,...
I have been trying to calculate a variable which takes iLow data from EURUSD but running into obstacles. Anybody have an idea how I could properly do this? I'm not an expert programmer, so constructive criticism please, no disparaging comments.         variable1 = -100 *(highClose*highClose -...
Hi, I'm looking to measure difference in two prices in points, in other words as example if I have price of 1.1112 and 1.1102, hot to measure 10 points difference? I can subtract one from another but I get 0.0001 instead of 10. Thanks!
I'm trying to figure out how to draw a horizontal line from the start of a day to the end at the open price, of the day.  Not sure how to represent start of day in the following code.  Any thoughts would be greatly appreciated.  I was thinking of converting time to seconds, but then, I would have to...
  expiry of EA (10)
I want to give my EA on rent for 1 month and e.g i want it to expire on 15th May, 2016.So should i write in the start funtion "if (TimeCurrent () > D'2016.05.15') return(INIT_FAILED); Is it OK? Should it stopbon 15th May? Please guide the correct code.
Hello comrades. How can I handle off quote errors in MQL4? What function to call? I do not know if the "IsTradeContextBusy()" function suitable to handle off quotes. Anybody please. Thank you in advance.
Hi, How to make the indicator object auto refreshing tick by tick? On my indicator I have to change into other time frame to refresh the trend lines. I tried using        WindowRedraw(); ChartRedraw(); inside the start() funciton, where we have the code for object calculation & drawing. I have 3...
I have an indicator that gives a signal (arrow) if a set of conditions is met, however I have not been able to find the documentation for a BAR ON CLOSE option. Any thoughts/ideas on how to accomplish this. My dream will be to have the Input in that way I can choose weather I would like the...
Hello   I ran an optiization that lasted 24hours and for some reason after it ended my pc crashed   I still have a file in /tester/caches with a type "File 0" which might be the result of my optimization ( same saving date as the expected end ot optimization or crash, name including the right ea and...
English : I have an expert advisor working and efficient. I have the need to compile the list in such a way that it is not open source visible. So I need a compiler software files processed in MQL4. Someone point me to where I can find this type of software and what's his name? My name is Nello my...
Hi,   I am sitting here for hours now trying to fix this thing until it turned out that my calculator can easily get the wanted result, but it seems that MT4 cant.   I should show the result -2.35671324   using this calculation:   Print(((1/10)*23.56713241)*(-1));    but instead it is showing -0....
I have this problem that gives me trouble for quite some days , I think it's pretty much a fact of the code structure, because in this case the shift of the news candle never increases . Because if the news comes out at 17:00 , at 17:01 the news candle will no longer 0 but will of course 1 ( M1 ) ,...
Hi , Any body can tell me how i can loop my ea after the whole process is complete( Open pending order -->  pending order get hit ---> open order get close --> no order --> start again --> Open pending order etc.. etc.. ) Thanks for the help.
New article Graphical Interfaces IV: the Multi-Window Mode and System of Priorities (Chapter 2) has been published: In this chapter, we will extend the library implementation to the possibility of creating multi-window interfaces for the MQL applications. We will also develop a system of priorities...