MQL4 and MetaTrader 4 - page 503

  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?
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"...
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: I
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...
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...
[Deleted]
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.) ‌
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...
  Hidden divergence  (656   1 2 3 4 5 ... 65 66)
Interested in absolutely everything on latent divergence. Thanks to Rustam for the link https://www.mql5.com/ru/code/8148 and the link to the hedging expert topic. I think the latent divergence is a reliable signal of the trend continuation and I am looking for an indicator that may express it, for
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...
Hi,All: I'm from China. Recently, I'm working with ea that concern the TimeZone of price data. Now I'm using the data from MT's data center, and I want to know the timezone of these data? is it GMT(8)? thanks
[Deleted]
It also seems to change, has anyone noticed that? Thanks, Matt
  TRADING  (2)
Hello, My name is Ricardo, I have not seem your trade in my plataform Meta Trader 4 for Avatrade.- Could you tell me if I made mistake Thanks for your comments‌
Hi everyone‌, ‌I try to test my strategy on the tester but I have weird ask price (show in the picture 1). They seems to be "too high‌" compare to the bid price. I've tried both (in the buy function), ask price (see pix2) and market price but the price seems always too much compare to the bid...
  question  (5)
can someone tell me what code i would use just to get a ea to buy 0.03 lots of the eur usd currency pair if it rises above a particular price , for example 1.0553  i tried to do it but the ea kept buying a additional 0.03 lots every tick  i tried to use the orderstotal function to ensure the ea...
Hi all I would like to know what function I need to use to select orders. Example I have 10 orders: 6 open, and 4 pending. 1 ==> OP_BUY 2 ==> OP_BUY 3 ==> OP_BUY 4 ==> OP_BUY 5 ==> OP_SELL 6 ==> OP_SELL 7 ==> OP_BUYSTOP 8 ==> OP_BUYSTOP 9 ==> OP_SELLSTOP 10 ==> OP_SELLSTOP My questions are how to...
int orderstotal = OrdersTotal();    int orders = 0;    int ordticket[30][2];    ArrayResize(ordticket,30,30);     for (int i = 0; i < orderstotal; i++)    {        if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES)==true){        if (OrderType() != OP_BUY || OrderSymbol() != Symbol() ||...