Download MetaTrader 5

MQL4 and MetaTrader 4 - page 42

To post a new topic, please log in or register
Hi all i have 2 questions A) Can i test my script when the market is closed? all I want to check if it opens an order when the next bar happens I have attempted to use the strategy tester but cannot see my script in thelist what could be the problem b) how do we search this group for post
Hi all I'm probably being an absolute dumb arse, but after MT4 stopped working on a demo account (I've not gone live yet), I uninstalled it and have tried to do a reinstallation. But wehn I download and install 'mt4setup.exe. from https://www.metatrader4.com/en - it installs MT5. This is driving...
  Symbol() (3)
I have been reading over the reference manual "MQL4". I can't find the correct reference to a string for Symbol(). Alert("Currency=",(),Symbol()); At the moment the Alert reads the currency at the top of the watch window. How can I change this to reflect the watched currency that I wish to look at?
Hi I am in the process of developing a DLL for MT4 that I want to return a string that is generated inside the DLL. If I use a function in the DLL like char* ReturnResult(char* stringToReturn) and pass the same string in as I get in return there is naturally no memory leak as it is a pointer to the...
Please find attached MT4 scripts that that allow a hot key to be assigned to each required TF. i.e CTRL 1 MN, CTRL 2 weekly etc.so that when applied to a profile of markets all of the markets change to the same time frame. These scripts have worked perfectly until recently. I’m not sure why, maybe...
Hi guys, ‌ I‌ have an indicator which takes quite a long time to calculate. This is a problem when I try to switch quickly between periods as the chart is stuck as long as the calculation is ongoing. Now i want to spread out this slow calculation over multiple frames, so that i can still work with...
Hello, is there any way to find if a given function from an external mqh is called from a custom indicator or from an expert advisor? Thanks in advance!
How do I link my MT4 to my email. I have tried to do this but it doesn't work, the problem probably has something to do with SMTP
Hi, I'm new to EA and I've been using free EA builders online. However I cannot find how to program the way I want, so I appreciate if I can get any advice. What I want to capture is a sudden price movement due to news or any events. Like if more than 2% price change from previous close price, then...
i want my label on top of order line and candle graph a‌nd i want to create background color behine of mylabel i want to know command ‌ one of part m‌y command    ObjectCreate("L1",OBJ_LABEL,0,0,0);    ObjectSet("L1",OBJPROP_XDISTANCE,70);    ObjectSet("L1",OBJPROP_YDISTANCE,40);    ObjectSet("L1"...
Can anyone point me to an example of code that can intercept signal data I have subscribed to in my account?  I would like to change the way autotrading is using the data but I do not know where I can intercept the data before it goes on the autotrader.  Thanks for any hints.
+------------------------------------------------------------------+//|                                                      ProjectName |//|                                      Copyright 2012, CompanyName |//|                                       http://www.companyname.net...
Really need some help here.Ive attached the EA as well as a Screenshot to make it easier to test out if you dont want to copy paste. Objective: I only need this to produce one buy after there is already one sell already and/or one sell after there is one buy already. Problem: The following piece of...
Hi guys, I'm working on an indicator that presents a market overview, showing stuff like symbol, quote, tickvalue, atr, and swap. My broker is using a 0 swaptype. I've done some research and the best thing I could find is this formula: MarketInfo(symbol,MODE_SWAPLONG)*MarketInfo(symbol...
Hello I have a function in my EA: void SetAllChartsToPeriod(int _period) {        long currChart,prevChart=ChartFirst();        int lim = 30;        int i=0;        while(i<lim && prevChart != -1) {                currChart=ChartNext(prevChart); // Get the new chart ID by using the previous chart...
hi friends, I found a problem regarding the array size in my Custom indicator . When I change my timeframe -for example change to M30- sometimes my indicator does not work properly it takes the error of "array out of range", but when I manually change the timeframe from M30 to another timeframe and...
Hi all, I would like to get matched moving average of highest & lowest price for each day. Example: Highest price for yesterday is 1.2 20MA= 1.15, 21MA= 1.22 I want to get the nearest MA that match with the highest price automatically which is 21MA. Is it possible to do that? Thank you. Add-on:...
About the AutoTrading button at the top of the Terminal, which I recall used to be named "Experts" or whatever: I was fairly certain that pre upgrade, the "Experts" switch would pause my EA, Alerts, everything the EA did. Now when I click the "AutoTrading" button so that it displays the red dot, my...
Hello all, first off apologies for the basic question... I'm a newbie in coding. I am profoundly confused! Below I did the following: void start(){ double monthlyHi0=iHigh(NULL,PERIOD_MN1,0); Print("Monthly High 0 is: "+monthlyHi0); double monthlyHi1=iHigh(NULL,PERIOD_MN1,1); Print("Monthly High 1...
Hi, How can i check if a pending order has been triggered? I have two pending orders and want to cancel one if the other opens but can't see a method to check if the order has been triggered? Thanks, Tori
Hello,  m‌y EA is supposed to never put takeprofit/stopbuy/sellstop so it will close with a minus position but sometimes it still does it. Here is an example: http://imgur.com/a/xGWKq (i hope it's not too small). EA puts a buystop at 1.06285 and it bought at 1.06290. Is there a possibility to check...
As the title says, when debugging, the debugger randomly stops with uninit reason 4 ("Chart Closed" according to the Uninitialization Reason Codes). ‌It could be anywhere from 7-15 minutes.‌ I'm not closing the chart and there's no functions in the EA that would cause the chart to close or even...
I get this error on the following code: class ConstantBar : public CObject{    private:            ConstantBar(int pCBType, int pRange, int pArraySize, double pStartAt) : nPoint(1) {                ...             };                    ConstantBar(int pCBType, int pRange, int pArraySize, double...
Hi everyone, ‌ I'm using a fib-tool that draws trend lines with labels at the right side, something I find very convenient, so I want my trend line‌ to have a label on the right side too. ‌I've added a label in the code‌, and the compile is without errors, but the label does not show up. Can anyone...
I‌ am a developer and I want to work on 1 terminal, If I use 2 terminal, I have to copy sources to 2 terminal. ‌‌That's Annoying‌. ‌ C‌an You do that like this picture or D‌uplicate same mt4 process (not copying terminal folder. that needs copying source too.) ‌
I set EventSetTimer(1) in OnInit (bool result is "true") , and I put my code in void OnTimer, but the indicator is still going through OnCalculate, which defeats the purpose of using OnTimer because the data received from the broker isn't faster than 1 second in some cases. Is there a way around...
Hi W‌hen I compile MQL5 an EX5 file is created in the ...Teminal\long-unique-number\MQL5\experts folder. I‌ am using MT4 and so no EA appears in my navigator window, even if I move the EX5 file into ...Terminal\long-unique-number\MQL4\experts Is it possible to use compiled MQL5 within MT4. Is a file...
Hello. Does anyone have a method in MetaTrader 4 to play a sound when an order is opened or closed from a signal? I would like to be a alerted when my account makes trades corresponding to the signal I am subscribed to. Can a script be written for this? Thank you.
Hi guys i`m having problem creating a bar counter code.Basically this EA would be a statistical tool for me and it would help me very much with my market research.It would count how many consecutive BEARISH bars appear before a BULLISH bar disrupts the sequence, and how many consecutive BULLISH...
As the title says, I'm having serious trouble installing any platform of MetaTrader on my computer. ‌‌‌Initially I downloaded MT4 from a different site from the main site, an affiliate but since I'm new here I don't know if I can mention the name. Failed to install, then I tried installing MT4 from...
1...353637383940414243444546474849...1250