MQL4 and MetaTrader 4

To post a new topic, please log in or register
  New MetaTrader 4 build 1170 (30   1 2 3)
New MetaTrader 4 build 1170 The MetaTrader 4 platform update will be released on December 20, 2018. The update fixes errors and improves the platform stability. We remind you that support for older versions of operating systems, including Windows XP/2003/Vista, has been discontinued. The minimum...
  New MetaTrader 4 build 1160 (92   1 2 3 4 5 ... 9 10)
New MetaTrader 4 build 1160 The updated version of the MetaTrader 4 platform will be released on December 14, 2018. The update will feature the following changes: Changed MQL5 Storage operation protocol in MetaEditor To support shared projects, we have updated the protocol of operation with the...
Hi guys... Can anyone tell me how to insert a small "1/2" symbol into my Text....  string HalfHourSymbol = "?";string NFP_HeadsUp = "NFP Starts in 1"+HalfHourSymbol+" hours"; ...I'm struggling to work this small thing out... Thanx
Hello everyone, I have a problem with a function I already used in another code and it was working. In this expert, even inserting it does not change anything and does not seem to work, I mean the breakeven....
Good morning everyone, I wrote an expert Advisor in mql4 format which open position at certain time of the day, it calculate number of lots, take profit and stop loss. Now I want to change it because it doesn’t work very well and I want that it open position when the candlestick start (in the...
Hi I have 2 questions. 1-How can I check the last order ,closed with takeprofit or closed manually ? if closed with take profit, for example do something . 2-for every new order , ea check the other open orders ,if difference between ASK price and any order open price is higher than certain amount ,...
Hello, I'm testing a lot of EA in this period and often I observed that SL/TP values are not respected if setted in OrderSend function. Maybe I have to set a SL of 20 pips but, when order will be created, often it differs from 20 pips. I think that this happens because I check multiple time to...
Hi, I just want to write some data to a csv. But I cannot see my mistake I get error 5004 over and over again. It creates the file, but it's size=0. The Timer is set to 5 sec. the "int start()"-function doesn't help either. Thanks in advance void OnTimer(){if (RunEA && IsTradeAllowed()) {   int...
hi these codes draw verticale lines (where  datetime t and string p are known) ObjectCreate(0, p, OBJ_VLINE, 0, t, 0);ObjectSetInteger(0, p, OBJPROP_COLOR, clrYellow);ObjectSetInteger(0, p, OBJPROP_STYLE, STYLE_SOLID);ObjectSetInteger(0, p, OBJPROP_SELECTABLE, false); Here are the lines drawn  I...
Hello dear programmers, I am building an EA based on my strategy but as I am still learning how to code properly I ran into some troubles. Would really appreciate your help! So basically lets say that my strategy generates  SELL signals at the price of X and then Y and then Z and so on. How can I...
Hi Guys, I am trying to back test an EA . My friend is reporting success with this EA and I wanted to check it out before dropping onto a chart on my Live account. It will not run on anything other than a Tallinex Live account. I set the Tester to run from 1st Jan 2017 to 25th August 2017 but it...
Hi everyone, I'm a beginner and I'm trying to learn. I have a problem, in this practice expert, I insert the stop loss exactly on the minimum of the candle and I would like the RR ratio to be 1 to 1. I'm trying to calculate the difference in pips between the maximum and the minimum and then add it...
Hi all, Wondering if anyone could tell me why I'm not being able to TRADE anything at all, there's no trade button available. I'm fairly new to all of this so may be something obvious! Many thanks.
If I use a Trailing stop and a stop loss shouldn't take the closer one?
Hi I don't know, if this has already been asked here, but I couldn't find it anywhere. My Metatrader4 platform lags big time and I don't know, what to do with it. I tried to google it, but the solutions I found didn't work in my case. I can't see the data in real time, as it refreshes only every...
Hello Just purchased an indicator but after logging in via metatrader and clicking the install button nothing happens, any idea what the problem could be kind regards Andrew
Im currently trading with 7 different EAs working on 17 different currencies and timeframes and trading for the last several months making good money. But last night I got stopped out in a deep drawdown and I think its because one of the Stops I set with one of the EAs effected my account balance as...
  Coding help (7751   1 2 3 4 5 ... 775 776)
Hi, Mr. Guru could you please help me to constantly refresh an ea after each tick movement. I have tried everything, But I just can't make it refresh constantly. What lines of code must I insert to keep an ea and indicator refresh after every tick? Tnx
  Traders joking, the beginning (7385   1 2 3 4 5 ... 738 739)
They say that an average trader can work for about twothree years. Then he has enough money to buy Ferrari and spend the rest of the money on psychoanalyst and antidepressants. Well, drive your Ferrari and save the rest of the money by reading our next column. Making money is one of the funniest...
Hi all, I would like to extract the value lines from the attached indicator (using iCustom function in my expert) but I'm not able because I seem there are no buffers. Could you help me? Thank you!
  TMA Bands (1)
I was wondering if anyone (Meta Trader or any programmer) can help me here with an issue that I have. I have an indicator called Extreme TMA Bands that I use in my EA logic, which is pretty much like Bollinger bands, that has an Upper, Middle, and lower Bands, and you can set the period that you...
this code produces the file shown: int start()  {   int handle = FileOpen(Symbol()+"_logfile.csv",FILE_CSV|FILE_READ|FILE_WRITE,','); if(handle>0)  {   //write file header   FileSeek(handle,0,SEEK_SET);   FileWrite(handle,"Symbol","idiot","idiot1","idiot2","idiot3");   for(int i = 1;i<10;i++)   {...
Hi, I am stuck for a week on this problem: I have the same EA (can easily give it different magic nr's) on like 7 pairs. I do not want the ea open a position when there is already a position open on that particulair pair.   I searched a lot on orderstotal, bools, magicnr's et  etc. Finally I get...
Hello! ‌‌Recently my MetaTrader 4 Market tab inside the Terminal window stopped working properly. Every Market tab (Main, Favorites, Purchased) shows a blank white screen. The same thing goes for all of my platforms running MetaTrader 4 version 4.00 build 1045 (3 Feb 2017). I have tried restarting...
ExtMapBuffer5[x] = (High[H2]); For some reason its not getting stored in my buffer! >__< If anyone can help Id appreciate it.
Hello everyone, I was asked by a friend of mine to attempt a code to show similarities with matching pairs. I found a code online which sort of did it, but after I modified the code isn't working correctly. I tried to track it down again, but I was not successful in finding the code again. Q:  How...
Hi, I have Metatrader 4, (which is compatible with my broker account), but can't trade multiple accounts. Does anyone know how to do this?
Hi All, This is the first time im posting here as it's my first time doing ANY coding, i seriously didnt know anything about coding since 2 days ago. I must say, it's pretty fun. I have learned quite a bit by trial and error and reading the articles here. Anyways this bot is still a work in progress...
Hello, There are  MT5 programs  where OnChartEvent() and EventChartCustom() are used to get multicurrency  datas  The program is explained in this article  Is it possible to adapt it for MT4 ...because what i tried is bugging
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334