MQL4 and MetaTrader 4

To post a new topic, please log in or register
New MetaTrader 4 Platform build 1210 The MetaTrader 4 platform update will be released on Friday, September 6, 2019. The new build features the following changes: Optimized "Market" and "Signals" section. In the new version, the product and signal showcases run faster and thus provide a better...
The MetaTrader 4 platform update will be released on Friday, September 13, 2019. The new build features the following changes: MetaTrader 4 Client Terminal build 1220 Fixed occasional slowdown caused by operations with a large number of graphical objects from MQL4 programs. Fixed passing of
Hi everyone, Floating Charts from www.floatingcharts.com stopped working 2 days ago, and the website is unreachable. Does someone else have the same problem? Thanks in advance
  Traders joking, the beginning (7615   1 2 3 4 5 ... 761 762)
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...
These 2 EA's execution speeds are very different, I take it due to the fact that in first one there is the declaration at top and in the second one there is only the declaration inside the OnTick() function. Is this all there's to it
I'm new to MQL. I'm trying to get the SMA of the ATR value. Is this supposed to work? int lookback = 1000; for(int i=lookback-1;i>=0;i--) atr[i] = iATR(NULL, 0, 10, i); for(int a=lookback-1;a>=0;a--) ma[a]=iMAOnArray(atr,lookback,20,0,MODE_SMA,a); Print("atr= "+DoubleToStr(atr[1], _Digits)+"
  Is <11 faster than <=10? (35   1 2 3 4)
<11 faster than <=10? for example if(b>0 && b<11) vs  if(b>0 && b<=10) Is the first one faster bc its just one thing < vs <=? Worth it?
Hi, I'M not very skilled in MQL4, and havig problems with the lot size in my EA, where souldn't be to orders open with the same Lot Size at the same time. I made a For loop that finds if there's an open order with the same Lot Size as the intended one, and if its true, adds 0.01 to the lot size, but
  Experiments ... (852   1 2 3 4 5 ... 85 86)
Thus thread will be used to post some experiments
Hello all, I was puzzled why the indicator below did not update on the M1 time frame - the error message was 'zero divide'. However the print statement showed the variable 'volume' to have a positive value. I then watched the M5 time frame which updated perfectly as did all the other time frames
I'm testing a EA on a DEMO Account and on REAL Account at the same time (2 sessions of MT4 running over different accounts, same machine, same EA) and results are quite differents... Can anybody tell me why? Regards,
Hi, Someone who understands the programming and structure of the MT4 platform itself may be able to answer the following: I am considering renting a cloud supercomputer with the idea of running various Optimization BackTests in MT4 much faster than on a local PC. My concern is that even with the
Hi there, Does anyone here ever experience this? I noticed that during high activity times during NY session, MT4 kind of lags and stutters. My computer is actually very powerful and I don´t have lots of indicator going on. Is there any way to improve this
My Mql5 indicators that I've had downloaded is not showing in my MT4 Tallinex account The Market Folder is missing from left side of Platform.  So I went to data - Indicator folder and the market folder is present with all the free indicators  that I've downloaded from this site.  I went to The EA...
TheRumpledOne is now coding FREE indicators for MT4 I am having a blast!!
Hi This mql4 code read the txt file string but as lower case not as upper case as it is saved in the file. Any idea where is the problem and how to get it to read the text as is? Thanks // string file contents// USD s wint filehandle=FileOpen(filename, FILE_READ | FILE_ANSI | FILE_COMMON, 0);
  Usefull links/threads/tools (48   1 2 3 4 5)
The thread about threads: what's going around the forum everywhere    ============ MT5, mql5, mql5.com suggestions for improvement thread ============ Requests & Ideas The beginning Requests & Ideas, the beginning - the thread   Suggestions for Trading System thread  After Requests &...
I have written an EA using among others the well known custom indicator called NonLagMA. I have written other EA's with this indicator without any problems that i was aware of at that time. I have two different length parameters that each are linked to either a Bull or Bear trend. I use two
In the attached file "5MinutesScalping-i4.mq4" you'll find the source code of an indicator I downloaded. It has 2 buffers (buffer 0 and 1) which provide buy/sell signals. Now I want to create my own custom indicator (attached file "Onno - Indicator.mq4") that uses the attached indicator by calling
I have installed metatrader 4 via PlayOnMac.  When I try and follow signals, I just get a prompt to download meta trader 4. Unsure on how to get signals setup on MT4. Any help would be wildly appreciated. 
Hi Guys - I'm struggling with something that should be really simple and I'm not sure what I am doing wrong here. I have 2 simple Dynamic Arrays. The first one stores a list of all my "Winning" (positive) trades and works fine after I sort them (MODE-DESCENDING): for(int i=NoTradesBest-1; i>=0; i--)
Hi,   it's been a month i'm stuck with this problem.   I found nowhere on Internet how to set up a hidden trailing stop so i tried to code it myself.   there is an error in my "Hidden TrailingStop" code.   here is my bot...
Hi all, I need to check if there is an arrow object on a certain bar, like in this graph. I'm watching the OBJ_ARROW functions but I don't find what I need. Have you got a suggestion? Thank you
Friends, can any developer insert the CALL and PUT buffers to work with MT2 in this attached indicator? Thank you
I am trying to drawn a TREND line but I just get a line running across the screen (the wide GOLD line below). EAM55_2 & EMA55_1 are the EMA's for 2 consecutive figures. The start time on the right hand side appears correct but I just want the length to be (in this example 5 (or 6) periods). Trying...
Could somebody please be so kind and teach me how to make a function to get the amount of bars since the order is open!? For example, if I bought a EUR/USD on 9/2, then today such function should return 10 in a daily chart, 240 (more or less) in a hourly chart, and so on. Much appreciated
I keep getting MT5 from the website metatrader4.com
Making backtesting on my MT4 I need to keep different objects on my chart. So I save them all preparing new template with them ... fortunately when I need go back to them an I am loading saved template they do not show up ... Strange because it shows three MA's on but not text or fibo levels
Hey Folks!! Hope everyone is doing just great!! Kindly assist in resolving a "zero divide error" that keeps coming up at the code below; double change; double PRI_MA; double CUR_MA; PRI_MA=iMA(NULL,60,60,0,MODE_SMA,PRICE_CLOSE,60); CUR_MA=iMA(NULL,60,60,0,MODE_SMA,PRICE_CLOSE,0);
Hey coders, sometimes I need a tick, may it be on a weekend or during quiet market times. I thought about forcing a tick by calling OnCalculate() from a chart event. This was my first idea: void OnChartEvent(const int id,                  const long &lparam,                  const double &dparam...
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366